util-helpers 4.12.8 → 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.
Files changed (44) hide show
  1. package/README.md +3 -1
  2. package/dist/util-helpers.js +81 -88
  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/calculateCursorPosition.js +6 -7
  7. package/esm/formatBankCard.js +5 -5
  8. package/esm/formatMobile.js +4 -3
  9. package/esm/formatMoney.js +9 -10
  10. package/esm/isBankCard.js +5 -6
  11. package/esm/isChinese.js +5 -6
  12. package/esm/isIdCard.js +5 -6
  13. package/esm/isPassword.js +7 -8
  14. package/esm/isTWCard.js +3 -4
  15. package/esm/numberToChinese.js +14 -15
  16. package/esm/replaceChar.js +10 -9
  17. package/esm/utils/config.js +1 -1
  18. package/esm/validatePassword.js +7 -8
  19. package/lib/calculateCursorPosition.js +6 -7
  20. package/lib/formatBankCard.js +5 -5
  21. package/lib/formatMobile.js +4 -3
  22. package/lib/formatMoney.js +9 -10
  23. package/lib/isBankCard.js +5 -6
  24. package/lib/isChinese.js +5 -6
  25. package/lib/isIdCard.js +5 -6
  26. package/lib/isPassword.js +7 -8
  27. package/lib/isTWCard.js +3 -4
  28. package/lib/numberToChinese.js +14 -15
  29. package/lib/replaceChar.js +10 -9
  30. package/lib/utils/config.js +1 -1
  31. package/lib/validatePassword.js +7 -8
  32. package/package.json +2 -1
  33. package/types/calculateCursorPosition.d.ts +1 -1
  34. package/types/formatBankCard.d.ts +1 -1
  35. package/types/formatMobile.d.ts +1 -1
  36. package/types/formatMoney.d.ts +1 -1
  37. package/types/isBankCard.d.ts +1 -1
  38. package/types/isChinese.d.ts +1 -1
  39. package/types/isIdCard.d.ts +1 -1
  40. package/types/isPassword.d.ts +1 -1
  41. package/types/isTWCard.d.ts +1 -1
  42. package/types/numberToChinese.d.ts +1 -1
  43. package/types/replaceChar.d.ts +1 -1
  44. package/types/validatePassword.d.ts +1 -1
@@ -32,7 +32,7 @@ export default isPassword;
32
32
  * isPassword(' _Aa12345678', {level: 3, ignoreCase: true}); // false
33
33
  *
34
34
  */
35
- declare function isPassword(value: any, { level, ignoreCase, special }?: {
35
+ declare function isPassword(value: any, options?: {
36
36
  level?: number | undefined;
37
37
  ignoreCase?: boolean | undefined;
38
38
  special?: string | undefined;
@@ -21,6 +21,6 @@ export default isTWCard;
21
21
  * // 宽松模式,支持一次性短期通行证
22
22
  * isTWCard('F290299977', { loose: true }); // true
23
23
  */
24
- declare function isTWCard(value: any, { loose }?: {
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, { big5, unit, decimal, zero, negative, unitConfig }?: {
39
+ declare function numberToChinese(num: number, options?: {
40
40
  big5?: boolean | undefined;
41
41
  unit?: boolean | undefined;
42
42
  decimal?: string | undefined;
@@ -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, { start, end, char, repeat, exclude }?: {
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, { level, ignoreCase, special }?: {
130
+ declare function validatePassword(value: string, options?: {
131
131
  level?: number | undefined;
132
132
  ignoreCase?: boolean | undefined;
133
133
  special?: string | undefined;