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方法主要是方便自己日常的代码编写
目前处于想到什么方法添加什么方法的缓慢完善进度中。。。
使用文档
更新日志
代码开源
已有方法(缓慢更新中)
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判断数据是否为非空类型,null或undefined或''或[]或{}均返回falseisNull判断数据是否为Null类型isNumber判断数据是否为Number类型isObject判断数据是否为Object类型,仅仅判断通过{}或new Object()创建出来的对象isString判断数据是否为String类型isSymbol判断数据是否为Symbol类型isUndefined判断数据是否为Undefined类型trimAll去掉 str 中的全部类型空格,包括t\r\f\n\s