JSPM

@quackxl/utility

0.0.4
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q38827F
    • License ISC

    JS常用工具封装

    Package Exports

    • @quackxl/utility
    • @quackxl/utility/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@quackxl/utility) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @quackxl/utility

    封装了一些常用的js方法

    主要是方便自己日常的代码编写

    目前处于想到什么方法添加什么方法的缓慢完善进度中。。。

    使用文档

    使用文档

    更新日志

    更新日志

    代码开源

    Github

    Gitee

    Npm

    已有方法(缓慢更新中)

    • checkColor 判断数据是否符合颜色格式规范
    • checkEmail 判断数据是否符合邮箱规范,支持带汉字的邮箱
    • checkHex 判断数据是否符合 hex 颜色格式规范
    • checkHsl 判断数据是否符合 hsl 颜色格式规范
    • checkHsla 判断数据是否符合 hsla 颜色格式规范
    • checkID 判断数据是否符合身份证号码规范,15 位或者 18 位
    • checkMobilePhone 判断数据是否符合移动电话号码规范
    • checkQQ 判断数据是否符合 QQ 号规范
    • checkRgb 判断数据是否符合 rgb 颜色格式规范
    • checkRgba 判断数据是否符合 rgba 颜色格式规范
    • checkTelephone 判断数据是否符合固定电话号码规范
    • dateFormat 时间格式化。根据传入的template格式将传入的dateTime时间转化为想要的时间字符串
    • getType 获取数据的类型
    • isArray 判断数据是否为 Array 类型
    • isBigInt 判断数据是否为 BigInt类型
    • isBoolean 判断数据是否为 Boolean类型
    • isNotEmpty 判断数据是否为非空类型,nullundefined''[]{}均返回false
    • isNull 判断数据是否为Null类型
    • isNumber 判断数据是否为Number类型
    • isObject 判断数据是否为Object类型,仅仅判断通过{}new Object()创建出来的对象
    • isString 判断数据是否为String类型
    • isSymbol 判断数据是否为Symbol类型
    • isUndefined 判断数据是否为Undefined类型
    • trimAll 去掉 str 中的全部类型空格,包括t\r\f\n\s