@l_j_w/check-data
v1.0.0
Published
功能强大的数据检测工具
Downloads
5
Maintainers
Readme
功能强大的数据检测工具
示例
检查是否是object
isObject({a: 1}) => true
检查是否是array
isArray([1]) => true
检查是否是function
isFunction(fn) => true
检查是否是string
isString('a') => true
检查是否是number
isNumber(1) => true
检查是否是date日期对象
isDate(new Date()) => true
检查是否是regexp
isRegExp(/\d/) => true
检查是否是Symbol
isSymbol(Symbol('a')) => true
检查是否是Map对象
isMap(new Map()) => true
检查是否是Set对象
isSet(new Set()) => true
检查是否是NaN
isNaN(NaN) => true
检查是否是null
isNull(null) => true
检查是否是undefined
isUndefined(undefined) => true
检查是否是空object
isEmptyObject({}) => true
检查是否是空array
isEmptyArray([]) => true
检查是否是空string
isEmptyString('') => true