util-helpers 5.4.1 → 5.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.
Files changed (62) hide show
  1. package/README.md +1 -0
  2. package/dist/util-helpers.js +52 -3
  3. package/dist/util-helpers.js.map +1 -1
  4. package/dist/util-helpers.min.js +1 -1
  5. package/dist/util-helpers.min.js.map +1 -1
  6. package/esm/AsyncMemo.js +1 -2
  7. package/esm/VERSION.js +2 -3
  8. package/esm/checkResult.js +27 -0
  9. package/esm/compressImage.js +1 -2
  10. package/esm/fileReader.js +1 -2
  11. package/esm/formatMoney.js +1 -2
  12. package/esm/index.js +1 -0
  13. package/esm/numberToChinese.js +2 -2
  14. package/esm/randomString.js +1 -2
  15. package/esm/safeDate.js +1 -2
  16. package/esm/transformObjectValue.js +1 -2
  17. package/lib/AsyncMemo.js +1 -2
  18. package/lib/VERSION.js +2 -3
  19. package/lib/checkResult.js +29 -0
  20. package/lib/compressImage.js +1 -2
  21. package/lib/fileReader.js +1 -2
  22. package/lib/formatMoney.js +1 -2
  23. package/lib/index.js +2 -0
  24. package/lib/numberToChinese.js +2 -2
  25. package/lib/randomString.js +1 -2
  26. package/lib/safeDate.js +1 -2
  27. package/lib/transformObjectValue.js +1 -2
  28. package/lib/utils/config.js +3 -2
  29. package/lib/utils/native.js +11 -5
  30. package/lib/utils/setup.js +3 -1
  31. package/package.json +5 -11
  32. package/types/AsyncMemo.d.ts +1 -1
  33. package/types/ajax.d.ts +2 -2
  34. package/types/calculateCursorPosition.d.ts +2 -2
  35. package/types/checkFileType.d.ts +2 -2
  36. package/types/checkResult.d.ts +34 -0
  37. package/types/compressImage.d.ts +1 -1
  38. package/types/dataURLToBlob.d.ts +1 -1
  39. package/types/download.d.ts +3 -3
  40. package/types/fileReader.d.ts +1 -1
  41. package/types/gcd.d.ts +1 -1
  42. package/types/getExtname.d.ts +1 -1
  43. package/types/getMimeType.d.ts +2 -2
  44. package/types/index.d.ts +3 -2
  45. package/types/isBankCard.d.ts +1 -1
  46. package/types/isBusinessLicense.d.ts +1 -1
  47. package/types/isChinese.d.ts +3 -3
  48. package/types/isHMCard.d.ts +1 -1
  49. package/types/isIdCard.d.ts +2 -2
  50. package/types/isPassport.d.ts +1 -1
  51. package/types/isPassword.d.ts +1 -1
  52. package/types/isSocialCreditCode.d.ts +1 -1
  53. package/types/isSwiftCode.d.ts +1 -1
  54. package/types/isTWCard.d.ts +1 -1
  55. package/types/isUrl.d.ts +1 -1
  56. package/types/isVehicle.d.ts +1 -1
  57. package/types/lcm.d.ts +1 -1
  58. package/types/numberToChinese.d.ts +1 -1
  59. package/types/parseIdCard.d.ts +1 -1
  60. package/types/safeDate.d.ts +1 -1
  61. package/types/setDataURLPrefix.d.ts +2 -2
  62. package/types/validatePassword.d.ts +1 -1
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @alias module:Validator.isSwiftCode
5
5
  * @since 4.9.0
6
- * @see {@link https://zh.wikipedia.org/wiki/ISO_9362 | ISO 9362}
6
+ * @see {@link https://zh.wikipedia.org/wiki/ISO_9362 ISO 9362}
7
7
  * @param {*} value 要检测的值
8
8
  * @returns {boolean} 值是否为 Swift Code
9
9
  * @example
@@ -6,7 +6,7 @@ type Options = {
6
6
  *
7
7
  * @alias module:Validator.isTWCard
8
8
  * @since 4.0.0
9
- * @see {@link https://zh.wikipedia.org/wiki/台湾居民来往大陆通行证 | 台湾居民来往大陆通行证}
9
+ * @see {@link https://zh.wikipedia.org/wiki/台湾居民来往大陆通行证 台湾居民来往大陆通行证}
10
10
  * @param {*} value 要检测的值
11
11
  * @param {Object} [options] 配置项
12
12
  * @param {boolean} [options.loose=false] 宽松模式,默认`false`。如果为true,表示支持一次性短期通行证
package/types/isUrl.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @alias module:Validator.isUrl
5
5
  * @since 3.4.0
6
- * @see {@link https://zh.wikipedia.org/wiki/统一资源定位符 | 统一资源定位符}
6
+ * @see {@link https://zh.wikipedia.org/wiki/统一资源定位符 统一资源定位符}
7
7
  * @param {*} value 要检测的值
8
8
  * @returns {boolean} 值是否为url
9
9
  * @example
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @alias module:Validator.isVehicle
5
5
  * @since 1.1.0
6
- * @see {@link https://baike.baidu.com/item/车牌号 | 车牌号}
6
+ * @see {@link https://baike.baidu.com/item/车牌号 车牌号}
7
7
  * @param {*} value 要检测的值
8
8
  * @returns {boolean} 值是否为车牌号
9
9
  * @example
package/types/lcm.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @alias module:Math.lcm
15
15
  * @since 4.20.0
16
- * @see {@link https://baike.baidu.com/item/最小公倍数 | 最小公倍数}
16
+ * @see {@link https://baike.baidu.com/item/最小公倍数 最小公倍数}
17
17
  * @param {...(number|string)} nums 两个或多个整数。
18
18
  * @returns {number} 最小公倍数。
19
19
  * @example
@@ -16,7 +16,7 @@ type Options = {
16
16
  *
17
17
  * @alias module:Processor.numberToChinese
18
18
  * @since 1.2.0
19
- * @see {@link https://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=F5DAC3377DA99C8D78AE66735B6359C7 | 出版物上数字用法}
19
+ * @see {@link https://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=F5DAC3377DA99C8D78AE66735B6359C7 出版物上数字用法}
20
20
  * @param {number} num 数字
21
21
  * @param {Object} [options] 配置项
22
22
  * @param {boolean} [options.big5=false] 繁体,默认`false`
@@ -35,7 +35,7 @@ type IdCardInfo = {
35
35
  *
36
36
  * @alias module:Processor.parseIdCard
37
37
  * @since 4.0.0
38
- * @see {@link https://baike.baidu.com/item/居民身份证号码 | 居民身份证号码}
38
+ * @see {@link https://baike.baidu.com/item/居民身份证号码 居民身份证号码}
39
39
  * @param {string} id 身份证号码,支持15位
40
40
  * @returns {IdCardInfo | null} 省份、生日、性别,省/市/区/年/月/日/性别编码。如果解析失败将返回 null 。
41
41
  * @example
@@ -13,7 +13,7 @@ interface SafeDate {
13
13
  * @function
14
14
  * @alias module:Processor.safeDate
15
15
  * @since 4.4.0
16
- * @see {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date | Date}
16
+ * @see {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date Date}
17
17
  * @param {string|number|Date} [value] 日期时间字符串、毫秒数、日期对象
18
18
  * @param {...number} [args] 月/日/时/分/秒/毫秒
19
19
  * @returns {Date} Date 实例日期对象
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * @alias module:Processor.setDataURLPrefix
7
7
  * @since 4.1.0
8
- * @see {@link https://developer.mozilla.org/zh-CN/docs/Web/URI/Schemes/data | Data URLs}
9
- * @see {@link https://www.iana.org/assignments/media-types/media-types.xhtml | Media Types}
8
+ * @see {@link https://developer.mozilla.org/zh-CN/docs/Web/URI/Schemes/data Data URLs}
9
+ * @see {@link https://www.iana.org/assignments/media-types/media-types.xhtml Media Types}
10
10
  * @param {string} data 数据本身
11
11
  * @param {string} [mimeType="image/png"] MIME 类型,默认`image/png`
12
12
  * @param {boolean} [base64=true] 添加 base64 标识,默认`true`
@@ -22,7 +22,7 @@ type Options = {
22
22
  *
23
23
  * @alias module:Validator.validatePassword
24
24
  * @since 3.7.0
25
- * @see {@link https://baike.baidu.com/item/ASCII#3 | ASCII}
25
+ * @see {@link https://baike.baidu.com/item/ASCII#3 ASCII}
26
26
  * @param {string} value 要检测的值
27
27
  * @param {Object} [options] 配置项
28
28
  * @param {number} [options.level=2] 密码强度,默认`2`。`1`-包含一种字符 `2`-包含两种字符 `3`-包含三种字符。(大写字母、小写字母、数字、特殊字符)