util-helpers 4.5.0 → 4.6.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 +5 -3
- package/dist/util-helpers.js +64 -2
- package/dist/util-helpers.min.js +1 -1
- package/dist/util-helpers.min.js.map +1 -1
- package/esm/calculateCursorPosition.js +62 -0
- package/esm/formatMobile.js +7 -0
- package/esm/index.js +1 -0
- package/esm/normalizeString.js +1 -1
- package/lib/calculateCursorPosition.js +73 -0
- package/lib/formatMobile.js +7 -0
- package/lib/index.js +8 -0
- package/lib/normalizeString.js +1 -1
- package/package.json +1 -1
- package/types/calculateCursorPosition.d.ts +25 -0
- package/types/formatMobile.d.ts +7 -0
- package/types/index.d.ts +1 -0
- package/types/normalizeString.d.ts +1 -1
package/README.md
CHANGED
|
@@ -47,8 +47,9 @@ formatMoney('1000'); // => 1,000.00
|
|
|
47
47
|
- [blobToDataURL](https://doly-dev.github.io/util-helpers/module-Processor.html#.blobToDataURL) - 将 Blob 或 File 对象转成 data:URL 格式的 Base64 字符串
|
|
48
48
|
- [bytesToSize](https://doly-dev.github.io/util-helpers/module-Processor.html#.bytesToSize) - 字节转换为存储单位
|
|
49
49
|
- [dataURLToBlob](https://doly-dev.github.io/util-helpers/module-Processor.html#.dataURLToBlob) - 将 DataURL 转为 Blob 对象
|
|
50
|
-
- [formatMoney](https://doly-dev.github.io/util-helpers/module-Processor.html#.formatMoney) -
|
|
51
|
-
- [
|
|
50
|
+
- [formatMoney](https://doly-dev.github.io/util-helpers/module-Processor.html#.formatMoney) - 格式化金额
|
|
51
|
+
- [formatMobile](https://doly-dev.github.io/util-helpers/module-Processor.html#.formatMobile) - 格式化手机号码
|
|
52
|
+
- [formatBankCard](https://doly-dev.github.io/util-helpers/module-Processor.html#.formatBankCard) - 格式化银行卡
|
|
52
53
|
- [normalizeString](https://doly-dev.github.io/util-helpers/module-Processor.html#.normalizeString) - 规整化字符串,如果值为 `undefined` `null` 转为 '',如果不是字符串类型则转为字符串
|
|
53
54
|
- [numberToChinese](https://doly-dev.github.io/util-helpers/module-Processor.html#.numberToChinese) - 数字转中文数字
|
|
54
55
|
- [parseIdCard](https://doly-dev.github.io/util-helpers/module-Processor.html#.parseIdCard) - 解析身份证号码
|
|
@@ -78,7 +79,8 @@ formatMoney('1000'); // => 1,000.00
|
|
|
78
79
|
- [isBusinessLicense](https://doly-dev.github.io/util-helpers/module-Validator.html#.isBusinessLicense) - 营业执照,也叫工商注册号
|
|
79
80
|
- [validatePassword](https://doly-dev.github.io/util-helpers/module-Validator.html#.validatePassword) - 验证密码
|
|
80
81
|
- 其他
|
|
81
|
-
- [
|
|
82
|
+
- [calculateCursorPosition](https://doly-dev.github.io/util-helpers/module-Other.html#.calculateCursorPosition) - 等待时间返回 Promise
|
|
83
|
+
- [waitTime](https://doly-dev.github.io/util-helpers/module-Other.html#.waitTime) - 计算光标位置
|
|
82
84
|
|
|
83
85
|
## 精选第三方工具库
|
|
84
86
|
|