20 lines
456 B
JavaScript
20 lines
456 B
JavaScript
/**
|
|
* @category Common Helpers
|
|
* @summary Is the given argument an instance of Date?
|
|
*
|
|
* @description
|
|
* Is the given argument an instance of Date?
|
|
*
|
|
* @param {*} argument - the argument to check
|
|
* @returns {Boolean} the given argument is an instance of Date
|
|
*
|
|
* @example
|
|
* // Is 'mayonnaise' a Date?
|
|
* var result = isDate('mayonnaise')
|
|
* //=> false
|
|
*/
|
|
function isDate (argument) {
|
|
return argument instanceof Date
|
|
}
|
|
|
|
module.exports = isDate
|