n2words 5.1.1 → 5.1.2
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/CHANGELOG.md +7 -0
- package/dist/am-ET.js +1 -1
- package/dist/am-ET.umd.js +1 -1
- package/dist/am-Latn-ET.js +1 -1
- package/dist/am-Latn-ET.umd.js +1 -1
- package/dist/ar-SA.js +1 -1
- package/dist/ar-SA.umd.js +1 -1
- package/dist/az-AZ.js +1 -1
- package/dist/az-AZ.umd.js +1 -1
- package/dist/bn-BD.js +1 -1
- package/dist/bn-BD.umd.js +1 -1
- package/dist/cs-CZ.js +1 -1
- package/dist/cs-CZ.umd.js +1 -1
- package/dist/da-DK.js +1 -1
- package/dist/da-DK.umd.js +1 -1
- package/dist/de-DE.js +1 -1
- package/dist/de-DE.umd.js +1 -1
- package/dist/el-GR.js +1 -1
- package/dist/el-GR.umd.js +1 -1
- package/dist/en-AU.js +1 -1
- package/dist/en-AU.umd.js +1 -1
- package/dist/en-BD.js +1 -1
- package/dist/en-BD.umd.js +1 -1
- package/dist/en-CA.js +1 -1
- package/dist/en-CA.umd.js +1 -1
- package/dist/en-GB.js +1 -1
- package/dist/en-GB.umd.js +1 -1
- package/dist/en-GH.js +1 -1
- package/dist/en-GH.umd.js +1 -1
- package/dist/en-IE.js +1 -1
- package/dist/en-IE.umd.js +1 -1
- package/dist/en-IN.js +1 -1
- package/dist/en-IN.umd.js +1 -1
- package/dist/en-KE.js +1 -1
- package/dist/en-KE.umd.js +1 -1
- package/dist/en-MY.js +1 -1
- package/dist/en-MY.umd.js +1 -1
- package/dist/en-NG.js +1 -1
- package/dist/en-NG.umd.js +1 -1
- package/dist/en-NZ.js +1 -1
- package/dist/en-NZ.umd.js +1 -1
- package/dist/en-PH.js +1 -1
- package/dist/en-PH.umd.js +1 -1
- package/dist/en-PK.js +1 -1
- package/dist/en-PK.umd.js +1 -1
- package/dist/en-SG.js +1 -1
- package/dist/en-SG.umd.js +1 -1
- package/dist/en-US.js +1 -1
- package/dist/en-US.umd.js +1 -1
- package/dist/en-ZA.js +1 -1
- package/dist/en-ZA.umd.js +1 -1
- package/dist/es-ES.js +1 -1
- package/dist/es-ES.umd.js +1 -1
- package/dist/es-MX.js +1 -1
- package/dist/es-MX.umd.js +1 -1
- package/dist/es-US.js +1 -1
- package/dist/es-US.umd.js +1 -1
- package/dist/fa-IR.js +1 -1
- package/dist/fa-IR.umd.js +1 -1
- package/dist/fi-FI.js +1 -1
- package/dist/fi-FI.umd.js +1 -1
- package/dist/fil-PH.js +1 -1
- package/dist/fil-PH.umd.js +1 -1
- package/dist/fr-BE.js +1 -1
- package/dist/fr-BE.umd.js +1 -1
- package/dist/fr-FR.js +1 -1
- package/dist/fr-FR.umd.js +1 -1
- package/dist/gu-IN.js +1 -1
- package/dist/gu-IN.umd.js +1 -1
- package/dist/ha-NG.js +1 -1
- package/dist/ha-NG.umd.js +1 -1
- package/dist/hbo-IL.js +1 -1
- package/dist/hbo-IL.umd.js +1 -1
- package/dist/he-IL.js +1 -1
- package/dist/he-IL.umd.js +1 -1
- package/dist/hi-IN.js +1 -1
- package/dist/hi-IN.umd.js +1 -1
- package/dist/hr-HR.js +2 -2
- package/dist/hr-HR.umd.js +2 -2
- package/dist/hu-HU.js +1 -1
- package/dist/hu-HU.umd.js +1 -1
- package/dist/id-ID.js +1 -1
- package/dist/id-ID.umd.js +1 -1
- package/dist/it-IT.js +1 -1
- package/dist/it-IT.umd.js +1 -1
- package/dist/ja-JP.js +1 -1
- package/dist/ja-JP.umd.js +1 -1
- package/dist/ka-GE.js +1 -1
- package/dist/ka-GE.umd.js +1 -1
- package/dist/kn-IN.js +1 -1
- package/dist/kn-IN.umd.js +1 -1
- package/dist/ko-KR.js +1 -1
- package/dist/ko-KR.umd.js +1 -1
- package/dist/lt-LT.js +1 -1
- package/dist/lt-LT.umd.js +1 -1
- package/dist/lv-LV.js +1 -1
- package/dist/lv-LV.umd.js +1 -1
- package/dist/mr-IN.js +1 -1
- package/dist/mr-IN.umd.js +1 -1
- package/dist/ms-MY.js +1 -1
- package/dist/ms-MY.umd.js +1 -1
- package/dist/nb-NO.js +1 -1
- package/dist/nb-NO.umd.js +1 -1
- package/dist/nl-NL.js +1 -1
- package/dist/nl-NL.umd.js +1 -1
- package/dist/pa-IN.js +1 -1
- package/dist/pa-IN.umd.js +1 -1
- package/dist/pl-PL.js +1 -1
- package/dist/pl-PL.umd.js +1 -1
- package/dist/pt-BR.js +1 -1
- package/dist/pt-BR.umd.js +1 -1
- package/dist/pt-PT.js +1 -1
- package/dist/pt-PT.umd.js +1 -1
- package/dist/ro-RO.js +1 -1
- package/dist/ro-RO.umd.js +1 -1
- package/dist/ru-RU.js +1 -1
- package/dist/ru-RU.umd.js +1 -1
- package/dist/sr-Cyrl-RS.js +1 -1
- package/dist/sr-Cyrl-RS.umd.js +1 -1
- package/dist/sr-Latn-RS.js +1 -1
- package/dist/sr-Latn-RS.umd.js +1 -1
- package/dist/sv-SE.js +1 -1
- package/dist/sv-SE.umd.js +1 -1
- package/dist/sw-KE.js +1 -1
- package/dist/sw-KE.umd.js +1 -1
- package/dist/ta-IN.js +1 -1
- package/dist/ta-IN.umd.js +1 -1
- package/dist/te-IN.js +1 -1
- package/dist/te-IN.umd.js +1 -1
- package/dist/th-TH.js +1 -1
- package/dist/th-TH.umd.js +1 -1
- package/dist/tr-TR.js +1 -1
- package/dist/tr-TR.umd.js +1 -1
- package/dist/uk-UA.js +1 -1
- package/dist/uk-UA.umd.js +1 -1
- package/dist/ur-PK.js +1 -1
- package/dist/ur-PK.umd.js +1 -1
- package/dist/vi-VN.js +1 -1
- package/dist/vi-VN.umd.js +1 -1
- package/dist/yo-NG.js +1 -1
- package/dist/yo-NG.umd.js +1 -1
- package/dist/zh-Hans-CN.js +1 -1
- package/dist/zh-Hans-CN.umd.js +1 -1
- package/dist/zh-Hant-TW.js +1 -1
- package/dist/zh-Hant-TW.umd.js +1 -1
- package/package.json +13 -13
- package/src/am-ET.d.ts +19 -6
- package/src/am-Latn-ET.d.ts +19 -6
- package/src/ar-SA.d.ts +46 -32
- package/src/az-AZ.d.ts +17 -6
- package/src/bn-BD.d.ts +18 -6
- package/src/cs-CZ.d.ts +19 -6
- package/src/da-DK.d.ts +19 -6
- package/src/de-DE.d.ts +30 -16
- package/src/el-GR.d.ts +18 -6
- package/src/en-AU.d.ts +27 -16
- package/src/en-BD.d.ts +28 -16
- package/src/en-CA.d.ts +46 -25
- package/src/en-GB.d.ts +28 -16
- package/src/en-GH.d.ts +35 -16
- package/src/en-IE.d.ts +38 -16
- package/src/en-IN.d.ts +28 -16
- package/src/en-KE.d.ts +35 -16
- package/src/en-MY.d.ts +38 -16
- package/src/en-NG.d.ts +38 -16
- package/src/en-NZ.d.ts +35 -16
- package/src/en-PH.d.ts +35 -16
- package/src/en-PK.d.ts +28 -16
- package/src/en-SG.d.ts +35 -16
- package/src/en-US.d.ts +44 -25
- package/src/en-ZA.d.ts +37 -16
- package/src/es-ES.d.ts +61 -42
- package/src/es-MX.d.ts +61 -42
- package/src/es-US.d.ts +61 -42
- package/src/fa-IR.d.ts +17 -6
- package/src/fi-FI.d.ts +19 -6
- package/src/fil-PH.d.ts +18 -6
- package/src/fr-BE.d.ts +35 -23
- package/src/fr-FR.d.ts +36 -23
- package/src/gu-IN.d.ts +19 -6
- package/src/ha-NG.d.ts +21 -6
- package/src/hbo-IL.d.ts +30 -17
- package/src/he-IL.d.ts +24 -11
- package/src/hi-IN.d.ts +19 -6
- package/src/hr-HR.d.ts +28 -15
- package/src/hr-HR.js +8 -6
- package/src/hu-HU.d.ts +18 -6
- package/src/id-ID.d.ts +18 -6
- package/src/it-IT.d.ts +30 -16
- package/src/ja-JP.d.ts +18 -6
- package/src/ka-GE.d.ts +20 -6
- package/src/kn-IN.d.ts +19 -6
- package/src/ko-KR.d.ts +18 -6
- package/src/lt-LT.d.ts +27 -15
- package/src/lv-LV.d.ts +28 -15
- package/src/mr-IN.d.ts +19 -6
- package/src/ms-MY.d.ts +18 -6
- package/src/nb-NO.d.ts +18 -6
- package/src/nl-NL.d.ts +42 -27
- package/src/pa-IN.d.ts +18 -6
- package/src/pl-PL.d.ts +28 -15
- package/src/pt-BR.d.ts +34 -21
- package/src/pt-PT.d.ts +29 -16
- package/src/ro-RO.d.ts +27 -15
- package/src/ru-RU.d.ts +38 -26
- package/src/sr-Cyrl-RS.d.ts +40 -26
- package/src/sr-Latn-RS.d.ts +40 -26
- package/src/sv-SE.d.ts +19 -6
- package/src/sw-KE.d.ts +17 -6
- package/src/ta-IN.d.ts +21 -6
- package/src/te-IN.d.ts +19 -6
- package/src/th-TH.d.ts +19 -6
- package/src/tr-TR.d.ts +22 -11
- package/src/uk-UA.d.ts +27 -15
- package/src/ur-PK.d.ts +18 -6
- package/src/utils/check-max.d.ts +1 -1
- package/src/utils/expand-scientific.d.ts +3 -3
- package/src/utils/is-plain-object.d.ts +1 -1
- package/src/utils/parse-cardinal.d.ts +7 -1
- package/src/utils/parse-currency.d.ts +6 -1
- package/src/utils/parse-ordinal.d.ts +6 -1
- package/src/utils/resolve-options.d.ts +1 -1
- package/src/utils/scale.d.ts +22 -22
- package/src/vi-VN.d.ts +17 -6
- package/src/yo-NG.d.ts +24 -6
- package/src/zh-Hans-CN.d.ts +46 -34
- package/src/zh-Hant-TW.d.ts +50 -34
package/src/es-US.d.ts
CHANGED
|
@@ -1,49 +1,39 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export const ordinalValues: {
|
|
22
|
-
gender: ReadonlyArray<Required<OrdinalOptions>["gender"]>;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @typedef {object} CurrencyOptions
|
|
26
|
-
* @property {boolean} [and] - Use "con" between dollars and cents
|
|
2
|
+
* Spanish (United States) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: es-US | Spanish as used in the United States
|
|
5
|
+
*
|
|
6
|
+
* Uses the short scale numbering system (like US English):
|
|
7
|
+
* - 10⁶ = millón
|
|
8
|
+
* - 10⁹ = billón (billion)
|
|
9
|
+
* - 10¹² = trillón (trillion)
|
|
10
|
+
*
|
|
11
|
+
* Spanish-specific rules:
|
|
12
|
+
* - Gender agreement: uno/una, veintiuno/veintiuna, hundreds
|
|
13
|
+
* - Special twenties: veinte, veintiuno, veintidós, ... veintinueve
|
|
14
|
+
* - "y" conjunction: treinta y uno (only 30-99 with ones)
|
|
15
|
+
* - "cien" for exact 100, "ciento/cienta" otherwise
|
|
16
|
+
* - Irregular hundreds: quinientos, setecientos, novecientos
|
|
17
|
+
* - "un" before millón (not "uno"), omit before mil
|
|
27
18
|
*/
|
|
28
|
-
|
|
29
|
-
export const
|
|
19
|
+
export declare const cardinalMax: bigint;
|
|
20
|
+
export declare const ordinalMax: bigint;
|
|
21
|
+
export declare const currencyMax: bigint;
|
|
30
22
|
export type CardinalOptions = {
|
|
31
23
|
/**
|
|
32
24
|
* - Grammatical gender
|
|
33
25
|
*/
|
|
34
|
-
gender?:
|
|
35
|
-
};
|
|
36
|
-
export type OrdinalOptions = {
|
|
37
|
-
/**
|
|
38
|
-
* - Grammatical gender
|
|
39
|
-
*/
|
|
40
|
-
gender?: "feminine" | "masculine" | undefined;
|
|
26
|
+
gender?: ('masculine' | 'feminine');
|
|
41
27
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @typedef {object} CardinalOptions
|
|
30
|
+
* @property {('masculine'|'feminine')} [gender] - Grammatical gender
|
|
31
|
+
*/
|
|
32
|
+
/** @type {Required<CardinalOptions>} */
|
|
33
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
34
|
+
/** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
|
|
35
|
+
export declare const cardinalValues: {
|
|
36
|
+
gender: ReadonlyArray<Required<CardinalOptions>['gender']>;
|
|
47
37
|
};
|
|
48
38
|
/**
|
|
49
39
|
* Converts a numeric value to Spanish words (US short scale).
|
|
@@ -57,7 +47,23 @@ export type CurrencyOptions = {
|
|
|
57
47
|
* toCardinal(21, {gender: 'feminine'}) // 'veintiuna'
|
|
58
48
|
* toCardinal(1000000000) // 'un billón'
|
|
59
49
|
*/
|
|
60
|
-
|
|
50
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
51
|
+
export type OrdinalOptions = {
|
|
52
|
+
/**
|
|
53
|
+
* - Grammatical gender
|
|
54
|
+
*/
|
|
55
|
+
gender?: ('masculine' | 'feminine');
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* @typedef {object} OrdinalOptions
|
|
59
|
+
* @property {('masculine'|'feminine')} [gender] - Grammatical gender
|
|
60
|
+
*/
|
|
61
|
+
/** @type {Required<OrdinalOptions>} */
|
|
62
|
+
export declare const ordinalDefaults: Required<OrdinalOptions>;
|
|
63
|
+
/** @type {{ gender: ReadonlyArray<Required<OrdinalOptions>['gender']> }} */
|
|
64
|
+
export declare const ordinalValues: {
|
|
65
|
+
gender: ReadonlyArray<Required<OrdinalOptions>['gender']>;
|
|
66
|
+
};
|
|
61
67
|
/**
|
|
62
68
|
* Converts a numeric value to Spanish ordinal words.
|
|
63
69
|
* @param {number | string | bigint} value - The positive integer to convert
|
|
@@ -70,7 +76,19 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
70
76
|
* toOrdinal(1, { gender: 'feminine' }) // 'primera'
|
|
71
77
|
* toOrdinal(21) // 'vigésimo primero'
|
|
72
78
|
*/
|
|
73
|
-
|
|
79
|
+
declare function toOrdinal(value: number | string | bigint, options?: OrdinalOptions): string;
|
|
80
|
+
export type CurrencyOptions = {
|
|
81
|
+
/**
|
|
82
|
+
* - Use "con" between dollars and cents
|
|
83
|
+
*/
|
|
84
|
+
and?: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* @typedef {object} CurrencyOptions
|
|
88
|
+
* @property {boolean} [and] - Use "con" between dollars and cents
|
|
89
|
+
*/
|
|
90
|
+
/** @type {Required<CurrencyOptions>} */
|
|
91
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
74
92
|
/**
|
|
75
93
|
* Converts a numeric value to US Dollar currency words in Spanish.
|
|
76
94
|
*
|
|
@@ -87,4 +105,5 @@ export function toOrdinal(value: number | string | bigint, options?: OrdinalOpti
|
|
|
87
105
|
* toCurrency(0.99) // 'noventa y nueve centavos'
|
|
88
106
|
* toCurrency(42.50, { and: false }) // 'cuarenta y dos dólares cincuenta centavos'
|
|
89
107
|
*/
|
|
90
|
-
|
|
108
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
109
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/fa-IR.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Persian (Iran) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: fa-IR | Persian as used in Iran
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - "و" (and) conjunction for compound numbers
|
|
8
|
+
* - Omit "یک" (one) before thousand
|
|
9
|
+
* - Pre-composed hundreds (دویست, سيصد, etc.)
|
|
10
|
+
*/
|
|
11
|
+
export declare const cardinalMax: null;
|
|
12
|
+
export declare const ordinalMax: null;
|
|
13
|
+
export declare const currencyMax: null;
|
|
4
14
|
/**
|
|
5
15
|
* Converts a numeric value to Persian words.
|
|
6
16
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
17
|
* @returns {string} The number in Persian words
|
|
8
18
|
*/
|
|
9
|
-
|
|
19
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
20
|
/**
|
|
11
21
|
* Converts a numeric value to Persian ordinal words.
|
|
12
22
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -18,7 +28,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
18
28
|
* toOrdinal(2) // 'دوم'
|
|
19
29
|
* toOrdinal(10) // 'دهم'
|
|
20
30
|
*/
|
|
21
|
-
|
|
31
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
22
32
|
/**
|
|
23
33
|
* Converts a numeric value to Persian currency words (Rial).
|
|
24
34
|
*
|
|
@@ -33,4 +43,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
33
43
|
* toCurrency(1000) // 'هزار ریال'
|
|
34
44
|
* toCurrency(-5) // 'منفى پنج ریال'
|
|
35
45
|
*/
|
|
36
|
-
|
|
46
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
47
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/fi-FI.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Finnish (Finland) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: fi-FI | Finnish as used in Finland
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Compound tens+ones without spaces: "kaksikymmentäyksi" (21)
|
|
8
|
+
* - Teens with "-toista" suffix
|
|
9
|
+
* - Omit "yksi" before sata/tuhat but keep before miljoona+
|
|
10
|
+
* - Long scale: miljoona, miljardi, biljoona
|
|
11
|
+
* - Per-digit decimal reading
|
|
12
|
+
*/
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
4
16
|
/**
|
|
5
17
|
* Converts a numeric value to Finnish words.
|
|
6
18
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -12,7 +24,7 @@ export const currencyMax: bigint;
|
|
|
12
24
|
* toCardinal(1000) // 'tuhat'
|
|
13
25
|
* toCardinal('3.14') // 'kolme pilkku yksi neljä'
|
|
14
26
|
*/
|
|
15
|
-
|
|
27
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
16
28
|
/**
|
|
17
29
|
* Converts a numeric value to Finnish ordinal words.
|
|
18
30
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -25,7 +37,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
25
37
|
* toOrdinal(3) // 'kolmas'
|
|
26
38
|
* toOrdinal(10) // 'kymmenes'
|
|
27
39
|
*/
|
|
28
|
-
|
|
40
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
29
41
|
/**
|
|
30
42
|
* Converts a numeric value to Finnish currency words (Euro).
|
|
31
43
|
*
|
|
@@ -40,4 +52,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
40
52
|
* toCurrency(42) // 'neljäkymmentäkaksi euroa'
|
|
41
53
|
* toCurrency(1.50) // 'yksi euro viisikymmentä senttiä'
|
|
42
54
|
*/
|
|
43
|
-
|
|
55
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
56
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/fil-PH.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Filipino (Philippines) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: fil-PH | Filipino as used in the Philippines
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Linker "ng" after vowels: "isang daang" (100)
|
|
8
|
+
* - Linker " na " after consonants: "siyam na daang" (900)
|
|
9
|
+
* - Special tens with linker: "limampung anim" (56)
|
|
10
|
+
* - Per-digit decimal reading
|
|
11
|
+
*/
|
|
12
|
+
export declare const cardinalMax: bigint;
|
|
13
|
+
export declare const ordinalMax: bigint;
|
|
14
|
+
export declare const currencyMax: bigint;
|
|
4
15
|
/**
|
|
5
16
|
* Converts a numeric value to Filipino words.
|
|
6
17
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
18
|
* @returns {string} The number in Filipino words
|
|
8
19
|
*/
|
|
9
|
-
|
|
20
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
21
|
/**
|
|
11
22
|
* Converts a numeric value to Filipino ordinal words.
|
|
12
23
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -18,7 +29,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
18
29
|
* toOrdinal(2) // 'ikalawa'
|
|
19
30
|
* toOrdinal(3) // 'ika-tatlo'
|
|
20
31
|
*/
|
|
21
|
-
|
|
32
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
22
33
|
/**
|
|
23
34
|
* Converts a numeric value to Filipino currency words (Philippine Peso).
|
|
24
35
|
*
|
|
@@ -32,4 +43,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
32
43
|
* toCurrency(1.50) // 'isang piso at limampung sentimo'
|
|
33
44
|
* toCurrency(-5) // 'negatibo limang piso'
|
|
34
45
|
*/
|
|
35
|
-
|
|
46
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
47
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/fr-BE.d.ts
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
*
|
|
2
|
+
* French (Belgium) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: fr-BE | French as used in Belgium
|
|
5
|
+
*
|
|
6
|
+
* Belgian French differences from standard French:
|
|
7
|
+
* - septante (70) instead of soixante-dix
|
|
8
|
+
* - nonante (90) instead of quatre-vingt-dix
|
|
9
|
+
* - Keeps quatre-vingts (80) like standard French
|
|
10
|
+
* - Uses "septante et un" (71), "nonante et un" (91)
|
|
13
11
|
*/
|
|
14
|
-
|
|
15
|
-
export const
|
|
12
|
+
export declare const cardinalMax: bigint;
|
|
13
|
+
export declare const ordinalMax: bigint;
|
|
14
|
+
export declare const currencyMax: bigint;
|
|
16
15
|
export type CardinalOptions = {
|
|
17
16
|
/**
|
|
18
17
|
* - Use hyphens between words
|
|
19
18
|
*/
|
|
20
|
-
withHyphenSeparator?: boolean
|
|
21
|
-
};
|
|
22
|
-
export type CurrencyOptions = {
|
|
23
|
-
/**
|
|
24
|
-
* - Use "et" between euros and centimes
|
|
25
|
-
*/
|
|
26
|
-
and?: boolean | undefined;
|
|
19
|
+
withHyphenSeparator?: boolean;
|
|
27
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {object} CardinalOptions
|
|
23
|
+
* @property {boolean} [withHyphenSeparator] - Use hyphens between words
|
|
24
|
+
*/
|
|
25
|
+
/** @type {Required<CardinalOptions>} */
|
|
26
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
28
27
|
/**
|
|
29
28
|
* Converts a numeric value to Belgian French words.
|
|
30
29
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
31
30
|
* @param {CardinalOptions} [options] - Optional configuration
|
|
32
31
|
* @returns {string} The number in Belgian French words
|
|
33
32
|
*/
|
|
34
|
-
|
|
33
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
35
34
|
/**
|
|
36
35
|
* Converts a numeric value to Belgian French ordinal words.
|
|
37
36
|
*
|
|
@@ -47,7 +46,19 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
47
46
|
* toOrdinal(70) // 'septantième'
|
|
48
47
|
* toOrdinal(90) // 'nonantième'
|
|
49
48
|
*/
|
|
50
|
-
|
|
49
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
50
|
+
export type CurrencyOptions = {
|
|
51
|
+
/**
|
|
52
|
+
* - Use "et" between euros and centimes
|
|
53
|
+
*/
|
|
54
|
+
and?: boolean;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @typedef {object} CurrencyOptions
|
|
58
|
+
* @property {boolean} [and] - Use "et" between euros and centimes
|
|
59
|
+
*/
|
|
60
|
+
/** @type {Required<CurrencyOptions>} */
|
|
61
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
51
62
|
/**
|
|
52
63
|
* Converts a numeric value to Belgian French currency words (Euro).
|
|
53
64
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -62,4 +73,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
62
73
|
* toCurrency(0.01) // 'un centime'
|
|
63
74
|
* toCurrency(42.50, { and: false }) // 'quarante-deux euros cinquante centimes'
|
|
64
75
|
*/
|
|
65
|
-
|
|
76
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
77
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/fr-FR.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
*
|
|
2
|
+
* French (France) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: fr-FR | French as used in France
|
|
5
|
+
*
|
|
6
|
+
* French-specific rules:
|
|
7
|
+
* - Vigesimal patterns: 70 = soixante-dix, 80 = quatre-vingts, 90 = quatre-vingt-dix
|
|
8
|
+
* - "et" conjunction: vingt et un (21), soixante et onze (71), but NOT quatre-vingt-un
|
|
9
|
+
* - Pluralization: "cents" loses 's' when followed by more digits
|
|
10
|
+
* - Long scale with -ard forms: milliard, billiard, trilliard
|
|
11
|
+
* - Omit "un" before mille
|
|
13
12
|
*/
|
|
14
|
-
|
|
15
|
-
export const
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
16
16
|
export type CardinalOptions = {
|
|
17
17
|
/**
|
|
18
18
|
* - Use hyphens between all words
|
|
19
19
|
*/
|
|
20
|
-
withHyphenSeparator?: boolean
|
|
21
|
-
};
|
|
22
|
-
export type CurrencyOptions = {
|
|
23
|
-
/**
|
|
24
|
-
* - Use "et" between euros and centimes
|
|
25
|
-
*/
|
|
26
|
-
and?: boolean | undefined;
|
|
20
|
+
withHyphenSeparator?: boolean;
|
|
27
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {object} CardinalOptions
|
|
24
|
+
* @property {boolean} [withHyphenSeparator] - Use hyphens between all words
|
|
25
|
+
*/
|
|
26
|
+
/** @type {Required<CardinalOptions>} */
|
|
27
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
28
28
|
/**
|
|
29
29
|
* Converts a numeric value to French words.
|
|
30
30
|
*
|
|
@@ -40,7 +40,7 @@ export type CurrencyOptions = {
|
|
|
40
40
|
* toCardinal(80) // 'quatre-vingts'
|
|
41
41
|
* toCardinal(1000000) // 'un million'
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
44
44
|
/**
|
|
45
45
|
* Converts a numeric value to French ordinal words.
|
|
46
46
|
*
|
|
@@ -60,7 +60,19 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
60
60
|
* toOrdinal(100) // 'centième'
|
|
61
61
|
* toOrdinal(1000) // 'millième'
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
64
|
+
export type CurrencyOptions = {
|
|
65
|
+
/**
|
|
66
|
+
* - Use "et" between euros and centimes
|
|
67
|
+
*/
|
|
68
|
+
and?: boolean;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* @typedef {object} CurrencyOptions
|
|
72
|
+
* @property {boolean} [and] - Use "et" between euros and centimes
|
|
73
|
+
*/
|
|
74
|
+
/** @type {Required<CurrencyOptions>} */
|
|
75
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
64
76
|
/**
|
|
65
77
|
* Converts a numeric value to French currency words (Euro).
|
|
66
78
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -75,4 +87,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
75
87
|
* toCurrency(0.01) // 'un centime'
|
|
76
88
|
* toCurrency(42.50, { and: false }) // 'quarante-deux euros cinquante centimes'
|
|
77
89
|
*/
|
|
78
|
-
|
|
90
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
91
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/gu-IN.d.ts
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Gujarati (India) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: gu-IN | Gujarati as used in India
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Indian numbering system (હજાર, લાખ, કરોડ)
|
|
8
|
+
* - Gujarati script
|
|
9
|
+
* - 3-2-2 grouping pattern (last 3 digits, then groups of 2)
|
|
10
|
+
* - Complete word forms for 0-99
|
|
11
|
+
* - Per-digit decimal reading
|
|
12
|
+
*/
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
4
16
|
/**
|
|
5
17
|
* Converts a numeric value to Gujarati words.
|
|
6
18
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
19
|
* @returns {string} The number in Gujarati words
|
|
8
20
|
*/
|
|
9
|
-
|
|
21
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
22
|
/**
|
|
11
23
|
* Converts a numeric value to Gujarati ordinal words.
|
|
12
24
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -18,7 +30,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
18
30
|
* toOrdinal(2) // 'બીજું'
|
|
19
31
|
* toOrdinal(10) // 'દસમું'
|
|
20
32
|
*/
|
|
21
|
-
|
|
33
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
22
34
|
/**
|
|
23
35
|
* Converts a numeric value to Gujarati currency words (Indian Rupee).
|
|
24
36
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -30,4 +42,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
30
42
|
* toCurrency(1) // 'એક રૂપિયો'
|
|
31
43
|
* toCurrency(0.01) // 'એક પૈસો'
|
|
32
44
|
*/
|
|
33
|
-
|
|
45
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
46
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/ha-NG.d.ts
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Hausa (Nigeria) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: ha-NG | Hausa as used in Nigeria
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Authentic Boko orthography with ɗ (hooked d) and ' (glottal stop)
|
|
8
|
+
* - Teens with "sha" prefix (sha ɗaya = 11)
|
|
9
|
+
* - Compound numbers with "da" connector (ashirin da ɗaya = 21)
|
|
10
|
+
* - Arabic loanwords for tens (ashirin, talatin, arba'in, etc.)
|
|
11
|
+
* - Reversed multiplier order: "biyu ɗari" (200), "biyu dubu" (2000)
|
|
12
|
+
* - Implicit one before ɗari and dubu
|
|
13
|
+
* - Per-digit decimal reading
|
|
14
|
+
*/
|
|
15
|
+
export declare const cardinalMax: bigint;
|
|
16
|
+
export declare const ordinalMax: bigint;
|
|
17
|
+
export declare const currencyMax: bigint;
|
|
4
18
|
/**
|
|
5
19
|
* Converts a numeric value to Hausa words.
|
|
6
20
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
21
|
* @returns {string} The number in Hausa words
|
|
8
22
|
*/
|
|
9
|
-
|
|
23
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
24
|
/**
|
|
11
25
|
* Converts a numeric value to Hausa ordinal words.
|
|
12
26
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -18,7 +32,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
18
32
|
* toOrdinal(2) // 'na biyu'
|
|
19
33
|
* toOrdinal(10) // 'na goma'
|
|
20
34
|
*/
|
|
21
|
-
|
|
35
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
22
36
|
/**
|
|
23
37
|
* Converts a numeric value to Hausa currency words (Nigerian Naira).
|
|
24
38
|
*
|
|
@@ -32,4 +46,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
32
46
|
* toCurrency(1.50) // 'ɗaya naira da hamsin kobo'
|
|
33
47
|
* toCurrency(-5) // 'babu biyar naira'
|
|
34
48
|
*/
|
|
35
|
-
|
|
49
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
50
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/hbo-IL.d.ts
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* Biblical Hebrew (Israel) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: hbo-IL | Biblical/Ancient Hebrew
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Gender agreement (masculine default, feminine via option)
|
|
8
|
+
* - Dual forms for 2, 200, 2000
|
|
9
|
+
* - Special 1-9 thousands construct state
|
|
10
|
+
* - "ו" (ve) conjunction rules vary by position
|
|
11
|
+
* - Per-digit decimal reading
|
|
8
12
|
*/
|
|
9
|
-
|
|
10
|
-
export const
|
|
11
|
-
|
|
12
|
-
export const cardinalValues: {
|
|
13
|
-
gender: ReadonlyArray<Required<CardinalOptions>["gender"]>;
|
|
14
|
-
};
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
15
16
|
export type CardinalOptions = {
|
|
16
17
|
/**
|
|
17
18
|
* - Grammatical gender
|
|
18
19
|
*/
|
|
19
|
-
gender?:
|
|
20
|
+
gender?: ('masculine' | 'feminine');
|
|
20
21
|
/**
|
|
21
22
|
* - Custom conjunction word
|
|
22
23
|
*/
|
|
23
|
-
andWord?: string
|
|
24
|
+
andWord?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {object} CardinalOptions
|
|
28
|
+
* @property {('masculine'|'feminine')} [gender] - Grammatical gender
|
|
29
|
+
* @property {string} [andWord] - Custom conjunction word
|
|
30
|
+
*/
|
|
31
|
+
/** @type {Required<CardinalOptions>} */
|
|
32
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
33
|
+
/** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
|
|
34
|
+
export declare const cardinalValues: {
|
|
35
|
+
gender: ReadonlyArray<Required<CardinalOptions>['gender']>;
|
|
24
36
|
};
|
|
25
37
|
/**
|
|
26
38
|
* Converts a numeric value to Biblical Hebrew words.
|
|
@@ -28,7 +40,7 @@ export type CardinalOptions = {
|
|
|
28
40
|
* @param {CardinalOptions} [options] - Optional configuration
|
|
29
41
|
* @returns {string} The number in Biblical Hebrew words
|
|
30
42
|
*/
|
|
31
|
-
|
|
43
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
32
44
|
/**
|
|
33
45
|
* Converts a numeric value to Biblical Hebrew ordinal words.
|
|
34
46
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -39,7 +51,7 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
39
51
|
* toOrdinal(1) // 'ראשון'
|
|
40
52
|
* toOrdinal(21) // 'עשרים וראשון'
|
|
41
53
|
*/
|
|
42
|
-
|
|
54
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
43
55
|
/**
|
|
44
56
|
* Converts a numeric value to Biblical Hebrew Shekel currency words.
|
|
45
57
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -50,4 +62,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
50
62
|
* toCurrency(1) // 'שקל אחד'
|
|
51
63
|
* toCurrency(2.50) // 'שניים שקלים חמישים גרות'
|
|
52
64
|
*/
|
|
53
|
-
|
|
65
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
66
|
+
export { toCardinal, toOrdinal, toCurrency };
|