index.js 456 B

1234567891011121314151617181920
  1. /**
  2. * @category Common Helpers
  3. * @summary Is the given argument an instance of Date?
  4. *
  5. * @description
  6. * Is the given argument an instance of Date?
  7. *
  8. * @param {*} argument - the argument to check
  9. * @returns {Boolean} the given argument is an instance of Date
  10. *
  11. * @example
  12. * // Is 'mayonnaise' a Date?
  13. * var result = isDate('mayonnaise')
  14. * //=> false
  15. */
  16. function isDate (argument) {
  17. return argument instanceof Date
  18. }
  19. module.exports = isDate