COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220221342/https://github.com/lodash/lodash/blob/master/isDate.js
Permalink
Cannot retrieve contributors at this time
27 lines (24 sloc)
692 Bytes
import getTag from './.internal/getTag.js'
import isObjectLike from './isObjectLike.js'
import nodeTypes from './.internal/nodeTypes.js'
/* Node.js helper references. */
const nodeIsDate = nodeTypes && nodeTypes . isDate
/**
* Checks if `value` is classified as a `Date` object.
*
* @since 0.1.0
* @category Lang
* @param {* } value The value to check.
* @returns {boolean } Returns `true` if `value` is a date object, else `false`.
* @example
*
* isDate(new Date)
* // => true
*
* isDate('Mon April 23 2012')
* // => false
*/
const isDate = nodeIsDate
? ( value ) => nodeIsDate ( value )
: ( value ) => isObjectLike ( value ) && getTag ( value ) == '[object Date]'
export default isDate
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.