util-helpers 4.12.9 → 4.12.10
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 +3 -1
- package/dist/util-helpers.js +81 -88
- 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/calculateCursorPosition.js +6 -7
- package/esm/formatBankCard.js +5 -5
- package/esm/formatMobile.js +4 -3
- package/esm/formatMoney.js +9 -10
- package/esm/isBankCard.js +5 -6
- package/esm/isChinese.js +5 -6
- package/esm/isIdCard.js +5 -6
- package/esm/isPassword.js +7 -8
- package/esm/isTWCard.js +3 -4
- package/esm/numberToChinese.js +14 -15
- package/esm/replaceChar.js +10 -9
- package/esm/utils/config.js +1 -1
- package/esm/validatePassword.js +7 -8
- package/lib/calculateCursorPosition.js +6 -7
- package/lib/formatBankCard.js +5 -5
- package/lib/formatMobile.js +4 -3
- package/lib/formatMoney.js +9 -10
- package/lib/isBankCard.js +5 -6
- package/lib/isChinese.js +5 -6
- package/lib/isIdCard.js +5 -6
- package/lib/isPassword.js +7 -8
- package/lib/isTWCard.js +3 -4
- package/lib/numberToChinese.js +14 -15
- package/lib/replaceChar.js +10 -9
- package/lib/utils/config.js +1 -1
- package/lib/validatePassword.js +7 -8
- package/package.json +1 -1
- package/types/calculateCursorPosition.d.ts +1 -1
- package/types/formatBankCard.d.ts +1 -1
- package/types/formatMobile.d.ts +1 -1
- package/types/formatMoney.d.ts +1 -1
- package/types/isBankCard.d.ts +1 -1
- package/types/isChinese.d.ts +1 -1
- package/types/isIdCard.d.ts +1 -1
- package/types/isPassword.d.ts +1 -1
- package/types/isTWCard.d.ts +1 -1
- package/types/numberToChinese.d.ts +1 -1
- package/types/replaceChar.d.ts +1 -1
- package/types/validatePassword.d.ts +1 -1
package/types/isTWCard.d.ts
CHANGED
|
@@ -21,6 +21,6 @@ export default isTWCard;
|
|
|
21
21
|
* // 宽松模式,支持一次性短期通行证
|
|
22
22
|
* isTWCard('F290299977', { loose: true }); // true
|
|
23
23
|
*/
|
|
24
|
-
declare function isTWCard(value: any,
|
|
24
|
+
declare function isTWCard(value: any, options?: {
|
|
25
25
|
loose?: boolean | undefined;
|
|
26
26
|
} | undefined): boolean;
|
|
@@ -36,7 +36,7 @@ export default numberToChinese;
|
|
|
36
36
|
* numberToChinese(1990, {unit: false, zero:'〇'}); // 一九九〇
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
|
-
declare function numberToChinese(num: number,
|
|
39
|
+
declare function numberToChinese(num: number, options?: {
|
|
40
40
|
big5?: boolean | undefined;
|
|
41
41
|
unit?: boolean | undefined;
|
|
42
42
|
decimal?: string | undefined;
|
package/types/replaceChar.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export default replaceChar;
|
|
|
37
37
|
* replaceChar('林某某某', {start: 1, end: Infinity, repeat: 2}); // 林**
|
|
38
38
|
*
|
|
39
39
|
*/
|
|
40
|
-
declare function replaceChar(str: string,
|
|
40
|
+
declare function replaceChar(str: string, options?: {
|
|
41
41
|
start?: number | undefined;
|
|
42
42
|
end?: number | undefined;
|
|
43
43
|
char?: string | undefined;
|
|
@@ -127,7 +127,7 @@ export type ValidatePasswordReturn = {
|
|
|
127
127
|
* }
|
|
128
128
|
* }
|
|
129
129
|
*/
|
|
130
|
-
declare function validatePassword(value: string,
|
|
130
|
+
declare function validatePassword(value: string, options?: {
|
|
131
131
|
level?: number | undefined;
|
|
132
132
|
ignoreCase?: boolean | undefined;
|
|
133
133
|
special?: string | undefined;
|