dotfiles/.vscode/extensions/vscodevim.vim-0.2.0/node_modules/lodash/_baseIsDate.js

28 lines
734 B
JavaScript
Raw Normal View History

2016-09-11 09:29:13 +01:00
var isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var dateTag = '[object Date]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* The base implementation of `_.isDate` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
*/
function baseIsDate(value) {
return isObjectLike(value) && objectToString.call(value) == dateTag;
}
module.exports = baseIsDate;