1 |
3a515b92
|
cagy
|
var baseGetTag = require('./_baseGetTag'),
|
2 |
|
|
isObjectLike = require('./isObjectLike');
|
3 |
|
|
|
4 |
|
|
/** `Object#toString` result references. */
|
5 |
|
|
var dateTag = '[object Date]';
|
6 |
|
|
|
7 |
|
|
/**
|
8 |
|
|
* The base implementation of `_.isDate` without Node.js optimizations.
|
9 |
|
|
*
|
10 |
|
|
* @private
|
11 |
|
|
* @param {*} value The value to check.
|
12 |
|
|
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
|
13 |
|
|
*/
|
14 |
|
|
function baseIsDate(value) {
|
15 |
|
|
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
16 |
|
|
}
|
17 |
|
|
|
18 |
|
|
module.exports = baseIsDate;
|