@l_j_w/check-data

    1.0.0 • Public • Published

    功能强大的数据检测工具

    示例

    检查是否是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
    

    Install

    npm i @l_j_w/check-data

    DownloadsWeekly Downloads

    6

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    7.27 kB

    Total Files

    21

    Last publish

    Collaborators

    • avatar