# isDate
# Description
检查 value 是否是 Date 对象。
# Params
value
# Return
Boolean
# Depend
import getTag from './.internal/getTag.js'
import isObjectLike from './isObjectLike.js'
import nodeTypes from './.internal/nodeTypes.js'
# Code
const nodeIsDate = nodeTypes && nodeTypes.isDate
const isDate = nodeIsDate
? (value) => nodeIsDate(value)
: (value) => isObjectLike(value) && getTag(value) == '[object Date]'
# Analyze
和 isArrayBuffer 基本一致,也是判断了 node
是否可用,不可用时就通过 getTag
判断了类型
# Remark
# Example
console.log(isDate(new Date)) // true