You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
504 B

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