budibase/packages/common/node_modules/date-fns/is_date/index.js

21 lines
456 B
JavaScript
Raw Normal View History

2020-04-07 16:12:08 +02:00
/**
* @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