util-helpers 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/util-helpers.js +106 -25
- package/dist/util-helpers.min.js +1 -1
- package/dist/util-helpers.min.js.map +1 -1
- package/esm/formatBankCard.js +1 -2
- package/esm/formatMobile.js +38 -0
- package/esm/index.js +1 -0
- package/esm/isHMCard.js +12 -0
- package/esm/isIdCard.js +1 -1
- package/esm/isTWCard.js +6 -0
- package/esm/parseIdCard.js +34 -14
- package/esm/safeDate.js +3 -2
- package/esm/setDataURLPrefix.js +1 -2
- package/esm/validatePassword.js +17 -1
- package/lib/formatBankCard.js +1 -2
- package/lib/formatMobile.js +48 -0
- package/lib/index.js +8 -0
- package/lib/isHMCard.js +12 -0
- package/lib/isIdCard.js +1 -1
- package/lib/isTWCard.js +6 -0
- package/lib/parseIdCard.js +34 -14
- package/lib/safeDate.js +3 -2
- package/lib/setDataURLPrefix.js +1 -2
- package/lib/validatePassword.js +17 -1
- package/package.json +1 -1
- package/types/formatMobile.d.ts +20 -0
- package/types/index.d.ts +1 -0
- package/types/isHMCard.d.ts +12 -0
- package/types/isTWCard.d.ts +6 -0
- package/types/parseIdCard.d.ts +84 -25
- package/types/safeDate.d.ts +3 -2
- package/types/setDataURLPrefix.d.ts +1 -2
- package/types/validatePassword.d.ts +58 -12
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ formatMoney('1000'); // => 1,000.00
|
|
|
53
53
|
- [numberToChinese](https://doly-dev.github.io/util-helpers/module-Processor.html#.numberToChinese) - 数字转中文数字
|
|
54
54
|
- [parseIdCard](https://doly-dev.github.io/util-helpers/module-Processor.html#.parseIdCard) - 解析身份证号码
|
|
55
55
|
- [replaceChar](https://doly-dev.github.io/util-helpers/module-Processor.html#.replaceChar) - 替换字符,应用场景如:脱敏
|
|
56
|
+
- [safeDate](https://doly-dev.github.io/util-helpers/module-Processor.html#.safeDate) - 创建一个 Date 实例,同 new Date
|
|
56
57
|
- [setDataURLPrefix](https://doly-dev.github.io/util-helpers/module-Processor.html#.setDataURLPrefix) - 设置 DataURL 前缀、MIME 类型、base64 标识
|
|
57
58
|
- 数据验证
|
|
58
59
|
- [isMobile](https://doly-dev.github.io/util-helpers/module-Validator.html#.isMobile) - 手机号码
|