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.
- package/README.md +1 -0
- package/dist/util-helpers.js +52 -3
- package/dist/util-helpers.js.map +1 -1
- package/dist/util-helpers.min.js +1 -1
- package/dist/util-helpers.min.js.map +1 -1
- package/esm/AsyncMemo.js +1 -2
- package/esm/VERSION.js +2 -3
- package/esm/checkResult.js +27 -0
- package/esm/compressImage.js +1 -2
- package/esm/fileReader.js +1 -2
- package/esm/formatMoney.js +1 -2
- package/esm/index.js +1 -0
- package/esm/numberToChinese.js +2 -2
- package/esm/randomString.js +1 -2
- package/esm/safeDate.js +1 -2
- package/esm/transformObjectValue.js +1 -2
- package/lib/AsyncMemo.js +1 -2
- package/lib/VERSION.js +2 -3
- package/lib/checkResult.js +29 -0
- package/lib/compressImage.js +1 -2
- package/lib/fileReader.js +1 -2
- package/lib/formatMoney.js +1 -2
- package/lib/index.js +2 -0
- package/lib/numberToChinese.js +2 -2
- package/lib/randomString.js +1 -2
- package/lib/safeDate.js +1 -2
- package/lib/transformObjectValue.js +1 -2
- package/lib/utils/config.js +3 -2
- package/lib/utils/native.js +11 -5
- package/lib/utils/setup.js +3 -1
- package/package.json +5 -11
- package/types/AsyncMemo.d.ts +1 -1
- package/types/ajax.d.ts +2 -2
- package/types/calculateCursorPosition.d.ts +2 -2
- package/types/checkFileType.d.ts +2 -2
- package/types/checkResult.d.ts +34 -0
- package/types/compressImage.d.ts +1 -1
- package/types/dataURLToBlob.d.ts +1 -1
- package/types/download.d.ts +3 -3
- package/types/fileReader.d.ts +1 -1
- package/types/gcd.d.ts +1 -1
- package/types/getExtname.d.ts +1 -1
- package/types/getMimeType.d.ts +2 -2
- package/types/index.d.ts +3 -2
- package/types/isBankCard.d.ts +1 -1
- package/types/isBusinessLicense.d.ts +1 -1
- package/types/isChinese.d.ts +3 -3
- package/types/isHMCard.d.ts +1 -1
- package/types/isIdCard.d.ts +2 -2
- package/types/isPassport.d.ts +1 -1
- package/types/isPassword.d.ts +1 -1
- package/types/isSocialCreditCode.d.ts +1 -1
- package/types/isSwiftCode.d.ts +1 -1
- package/types/isTWCard.d.ts +1 -1
- package/types/isUrl.d.ts +1 -1
- package/types/isVehicle.d.ts +1 -1
- package/types/lcm.d.ts +1 -1
- package/types/numberToChinese.d.ts +1 -1
- package/types/parseIdCard.d.ts +1 -1
- package/types/safeDate.d.ts +1 -1
- package/types/setDataURLPrefix.d.ts +2 -2
- package/types/validatePassword.d.ts +1 -1
package/types/isSwiftCode.d.ts
CHANGED
|
@@ -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
|
|
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
|
package/types/isTWCard.d.ts
CHANGED
|
@@ -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
package/types/isVehicle.d.ts
CHANGED
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`
|
package/types/parseIdCard.d.ts
CHANGED
|
@@ -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
|
package/types/safeDate.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
9
|
-
* @see {@link https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
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
|
|
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`-包含三种字符。(大写字母、小写字母、数字、特殊字符)
|