Checks if a value is of a given type
检查值是否为给定类型
The value to check. 要检查的值
The type to check against. 要检查的类型
True if the value is of the given type, false otherwise. 如果值为给定类型则返回true,否则返回false
isTypeof(null, 'null') // => trueisTypeof(undefined, 'undefined') // => trueisTypeof({}, 'object') // => true Copy
isTypeof(null, 'null') // => trueisTypeof(undefined, 'undefined') // => trueisTypeof({}, 'object') // => true
Checks if a value is of a given type
检查值是否为给定类型