mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
19 lines
516 B
JavaScript
19 lines
516 B
JavaScript
define(['./_baseGetTag', './isObjectLike'], function(baseGetTag, isObjectLike) {
|
|
|
|
/** `Object#toString` result references. */
|
|
var dateTag = '[object Date]';
|
|
|
|
/**
|
|
* 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) && baseGetTag(value) == dateTag;
|
|
}
|
|
|
|
return baseIsDate;
|
|
});
|