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/lv-LV.d.ts
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Latvian (Latvia) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: lv-LV | Latvian as used in Latvia
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Two-form pluralization (singular for 1 except 11, plural otherwise)
|
|
8
|
+
* - Gender agreement (masculine/feminine for numbers < 1000)
|
|
9
|
+
* - Special hundreds forms (simts/simti/simtu)
|
|
10
|
+
* - Omit "one" before scale words
|
|
11
|
+
* - Long scale naming
|
|
7
12
|
*/
|
|
8
|
-
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
export const cardinalValues: {
|
|
12
|
-
gender: ReadonlyArray<Required<CardinalOptions>["gender"]>;
|
|
13
|
-
};
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
14
16
|
export type CardinalOptions = {
|
|
15
17
|
/**
|
|
16
18
|
* - Gender for numbers < 1000
|
|
17
19
|
*/
|
|
18
|
-
gender?:
|
|
20
|
+
gender?: ('masculine' | 'feminine');
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {object} CardinalOptions
|
|
24
|
+
* @property {('masculine'|'feminine')} [gender] - Gender for numbers < 1000
|
|
25
|
+
*/
|
|
26
|
+
/** @type {Required<CardinalOptions>} */
|
|
27
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
28
|
+
/** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
|
|
29
|
+
export declare const cardinalValues: {
|
|
30
|
+
gender: ReadonlyArray<Required<CardinalOptions>['gender']>;
|
|
19
31
|
};
|
|
20
32
|
/**
|
|
21
33
|
* Converts a numeric value to Latvian words.
|
|
@@ -29,7 +41,7 @@ export type CardinalOptions = {
|
|
|
29
41
|
* toCardinal(1, { gender: 'feminine' }) // 'viena'
|
|
30
42
|
* toCardinal(1000) // 'tūkstotis'
|
|
31
43
|
*/
|
|
32
|
-
|
|
44
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
33
45
|
/**
|
|
34
46
|
* Converts a numeric value to Latvian ordinal words (masculine nominative).
|
|
35
47
|
* @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
|
|
@@ -43,7 +55,7 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
43
55
|
* toOrdinal(100) // 'simtais'
|
|
44
56
|
* toOrdinal(1000) // 'tūkstošais'
|
|
45
57
|
*/
|
|
46
|
-
|
|
58
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
47
59
|
/**
|
|
48
60
|
* Converts a numeric value to Latvian currency words (Euro).
|
|
49
61
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -56,4 +68,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
56
68
|
* toCurrency(1.50) // 'viens eiro piecdesmit centu'
|
|
57
69
|
* toCurrency(-5) // 'mīnus pieci eiro'
|
|
58
70
|
*/
|
|
59
|
-
|
|
71
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
72
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/mr-IN.d.ts
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Marathi (India) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: mr-IN | Marathi as used in India
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Indian numbering system (हजार, लाख, कोटी)
|
|
8
|
+
* - Devanagari 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 Marathi words.
|
|
6
18
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
19
|
* @returns {string} The number in Marathi words
|
|
8
20
|
*/
|
|
9
|
-
|
|
21
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
22
|
/**
|
|
11
23
|
* Converts a numeric value to Marathi ordinal words.
|
|
12
24
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -19,7 +31,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
19
31
|
* toOrdinal(3) // 'तिसरा'
|
|
20
32
|
* toOrdinal(10) // 'दहावा'
|
|
21
33
|
*/
|
|
22
|
-
|
|
34
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
23
35
|
/**
|
|
24
36
|
* Converts a numeric value to Marathi currency words (Indian Rupee).
|
|
25
37
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -31,4 +43,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
31
43
|
* toCurrency(1) // 'एक रुपया'
|
|
32
44
|
* toCurrency(0.01) // 'एक पैसा'
|
|
33
45
|
*/
|
|
34
|
-
|
|
46
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
47
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/ms-MY.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Malay (Malaysia) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: ms-MY | Malay (Bahasa Melayu) as used in Malaysia
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - "Se-" prefix for ALL singular scale units (seratus, seribu, sejuta, sebilion)
|
|
8
|
+
* - Regular patterns (puluh for tens, ratus for hundreds)
|
|
9
|
+
* - Teens with "belas" suffix
|
|
10
|
+
* - Note: "lapan" (8) differs from Indonesian "delapan"
|
|
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 Malay words.
|
|
6
17
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
18
|
* @returns {string} The number in Malay words
|
|
8
19
|
*/
|
|
9
|
-
|
|
20
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
21
|
/**
|
|
11
22
|
* Converts a numeric value to Malay 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) // 'kedua'
|
|
19
30
|
* toOrdinal(10) // 'kesepuluh'
|
|
20
31
|
*/
|
|
21
|
-
|
|
32
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
22
33
|
/**
|
|
23
34
|
* Converts a numeric value to Malay currency words (Ringgit).
|
|
24
35
|
*
|
|
@@ -32,4 +43,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
32
43
|
* toCurrency(1.50) // 'satu ringgit lima puluh sen'
|
|
33
44
|
* toCurrency(-5) // 'minus lima ringgit'
|
|
34
45
|
*/
|
|
35
|
-
|
|
46
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
47
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/nb-NO.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Norwegian Bokmål (Norway) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: nb-NO | Norwegian Bokmål as used in Norway
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Hyphenated tens+ones: "tjue-en" (21)
|
|
8
|
+
* - "og" conjunction after hundreds
|
|
9
|
+
* - Comma separator after thousands before hundreds
|
|
10
|
+
* - Short scale: million, milliard, billion, etc.
|
|
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 Norwegian Bokmål words.
|
|
6
17
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -12,7 +23,7 @@ export const currencyMax: bigint;
|
|
|
12
23
|
* toCardinal(101) // 'en hundre og en'
|
|
13
24
|
* toCardinal(1000000) // 'en million'
|
|
14
25
|
*/
|
|
15
|
-
|
|
26
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
16
27
|
/**
|
|
17
28
|
* Converts a numeric value to Norwegian Bokmål ordinal words.
|
|
18
29
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -24,7 +35,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
24
35
|
* toOrdinal(2) // 'andre'
|
|
25
36
|
* toOrdinal(21) // 'tjue-ende'
|
|
26
37
|
*/
|
|
27
|
-
|
|
38
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
28
39
|
/**
|
|
29
40
|
* Converts a numeric value to Norwegian currency words (Norwegian Krone).
|
|
30
41
|
*
|
|
@@ -38,4 +49,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
38
49
|
* toCurrency(42) // 'førti-to kroner'
|
|
39
50
|
* toCurrency(1.50) // 'en krone og femti øre'
|
|
40
51
|
*/
|
|
41
|
-
|
|
52
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
53
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/nl-NL.d.ts
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
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
|
-
*
|
|
2
|
+
* Dutch (Netherlands) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: nl-NL | Dutch as used in the Netherlands
|
|
5
|
+
*
|
|
6
|
+
* Dutch-specific rules:
|
|
7
|
+
* - Inverted tens-ones: eenentwintig (one-and-twenty)
|
|
8
|
+
* - "ën" connector when ones ends in 'e' (twee, drie)
|
|
9
|
+
* - Compound words without spaces
|
|
10
|
+
* - Hundred pairing for 1100-9999 (elfhonderd style)
|
|
11
|
+
* - "één" vs "een" (accentOne option)
|
|
12
|
+
* - Optional "en" separator (includeOptionalAnd option)
|
|
13
|
+
* - Long scale with -ard forms
|
|
15
14
|
*/
|
|
16
|
-
|
|
17
|
-
export const
|
|
15
|
+
export declare const cardinalMax: bigint;
|
|
16
|
+
export declare const ordinalMax: bigint;
|
|
17
|
+
export declare const currencyMax: bigint;
|
|
18
18
|
export type CardinalOptions = {
|
|
19
19
|
/**
|
|
20
20
|
* - Use "één" instead of "een"
|
|
21
21
|
*/
|
|
22
|
-
accentOne?: boolean
|
|
22
|
+
accentOne?: boolean;
|
|
23
23
|
/**
|
|
24
24
|
* - Include "en" before small numbers
|
|
25
25
|
*/
|
|
26
|
-
includeOptionalAnd?: boolean
|
|
26
|
+
includeOptionalAnd?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* - Disable hundred pairing (1104→duizend honderdvier)
|
|
29
29
|
*/
|
|
30
|
-
noHundredPairing?: boolean
|
|
31
|
-
};
|
|
32
|
-
export type CurrencyOptions = {
|
|
33
|
-
/**
|
|
34
|
-
* - Include "en" between euros and cents
|
|
35
|
-
*/
|
|
36
|
-
and?: boolean | undefined;
|
|
30
|
+
noHundredPairing?: boolean;
|
|
37
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* @typedef {object} CardinalOptions
|
|
34
|
+
* @property {boolean} [accentOne] - Use "één" instead of "een"
|
|
35
|
+
* @property {boolean} [includeOptionalAnd] - Include "en" before small numbers
|
|
36
|
+
* @property {boolean} [noHundredPairing] - Disable hundred pairing (1104→duizend honderdvier)
|
|
37
|
+
*/
|
|
38
|
+
/** @type {Required<CardinalOptions>} */
|
|
39
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
38
40
|
/**
|
|
39
41
|
* Converts a numeric value to Dutch words.
|
|
40
42
|
*
|
|
@@ -51,7 +53,7 @@ export type CurrencyOptions = {
|
|
|
51
53
|
* toCardinal(1, {accentOne: false}) // 'een'
|
|
52
54
|
* toCardinal(1104) // 'elfhonderd vier'
|
|
53
55
|
*/
|
|
54
|
-
|
|
56
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
55
57
|
/**
|
|
56
58
|
* Converts a number to Dutch ordinal words.
|
|
57
59
|
* @param {number | string | bigint} value - The number to convert
|
|
@@ -61,7 +63,19 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
61
63
|
* toOrdinal(21) // 'eenentwintigste'
|
|
62
64
|
* toOrdinal(100) // 'honderdste'
|
|
63
65
|
*/
|
|
64
|
-
|
|
66
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
67
|
+
export type CurrencyOptions = {
|
|
68
|
+
/**
|
|
69
|
+
* - Include "en" between euros and cents
|
|
70
|
+
*/
|
|
71
|
+
and?: boolean;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @typedef {object} CurrencyOptions
|
|
75
|
+
* @property {boolean} [and] - Include "en" between euros and cents
|
|
76
|
+
*/
|
|
77
|
+
/** @type {Required<CurrencyOptions>} */
|
|
78
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
65
79
|
/**
|
|
66
80
|
* Converts a number to Dutch currency words (Euro).
|
|
67
81
|
* @param {number | string | bigint} value - The amount to convert
|
|
@@ -72,4 +86,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
72
86
|
* toCurrency(1) // 'één euro'
|
|
73
87
|
* toCurrency(0.01) // 'één cent'
|
|
74
88
|
*/
|
|
75
|
-
|
|
89
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
90
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/pa-IN.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Punjabi (India) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: pa-IN | Punjabi (Gurmukhi) as used in India
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Indian numbering system (ਹਜ਼ਾਰ, ਲੱਖ, ਕਰੋੜ)
|
|
8
|
+
* - Gurmukhi script
|
|
9
|
+
* - 3-2-2 grouping pattern (last 3 digits, then groups of 2)
|
|
10
|
+
* - Complete word forms for 0-99
|
|
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 Punjabi words.
|
|
6
17
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
18
|
* @returns {string} The number in Punjabi words
|
|
8
19
|
*/
|
|
9
|
-
|
|
20
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
21
|
/**
|
|
11
22
|
* Converts a numeric value to Punjabi ordinal words.
|
|
12
23
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -19,7 +30,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
19
30
|
* toOrdinal(3) // 'ਤੀਜਾ'
|
|
20
31
|
* toOrdinal(10) // 'ਦੱਸਵਾਂ'
|
|
21
32
|
*/
|
|
22
|
-
|
|
33
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
23
34
|
/**
|
|
24
35
|
* Converts a numeric value to Punjabi currency words (Indian Rupee).
|
|
25
36
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -31,4 +42,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
31
42
|
* toCurrency(1) // 'ਇੱਕ ਰੁਪਇਆ'
|
|
32
43
|
* toCurrency(0.01) // 'ਇੱਕ ਪੈਸਾ'
|
|
33
44
|
*/
|
|
34
|
-
|
|
45
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
46
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/pl-PL.d.ts
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Polish (Poland) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: pl-PL | Polish as used in Poland
|
|
5
|
+
*
|
|
6
|
+
* Polish-specific rules:
|
|
7
|
+
* - Three-form pluralization: 1 = singular, 2-4 = few, 5+ = many
|
|
8
|
+
* - Gender agreement (masculine/feminine for numbers < 1000)
|
|
9
|
+
* - Omit "jeden" before scale words (tysiąc, milion, etc.)
|
|
10
|
+
* - Irregular hundreds: dwieście, trzysta, czterysta, pięćset...
|
|
11
|
+
* - Long scale with -ard forms: miliard, biliard, tryliard
|
|
7
12
|
*/
|
|
8
|
-
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
export const cardinalValues: {
|
|
12
|
-
gender: ReadonlyArray<Required<CardinalOptions>["gender"]>;
|
|
13
|
-
};
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
14
16
|
export type CardinalOptions = {
|
|
15
17
|
/**
|
|
16
18
|
* - Gender for numbers < 1000
|
|
17
19
|
*/
|
|
18
|
-
gender?:
|
|
20
|
+
gender?: ('masculine' | 'feminine');
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {object} CardinalOptions
|
|
24
|
+
* @property {('masculine'|'feminine')} [gender] - Gender for numbers < 1000
|
|
25
|
+
*/
|
|
26
|
+
/** @type {Required<CardinalOptions>} */
|
|
27
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
28
|
+
/** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
|
|
29
|
+
export declare const cardinalValues: {
|
|
30
|
+
gender: ReadonlyArray<Required<CardinalOptions>['gender']>;
|
|
19
31
|
};
|
|
20
32
|
/**
|
|
21
33
|
* Converts a numeric value to Polish words.
|
|
@@ -33,7 +45,7 @@ export type CardinalOptions = {
|
|
|
33
45
|
* toCardinal(1000) // 'tysiąc'
|
|
34
46
|
* toCardinal(2000) // 'dwa tysiące'
|
|
35
47
|
*/
|
|
36
|
-
|
|
48
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
37
49
|
/**
|
|
38
50
|
* Converts a numeric value to Polish ordinal words (masculine nominative).
|
|
39
51
|
* @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
|
|
@@ -49,7 +61,7 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
49
61
|
* toOrdinal(100) // 'setny'
|
|
50
62
|
* toOrdinal(1000) // 'tysięczny'
|
|
51
63
|
*/
|
|
52
|
-
|
|
64
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
53
65
|
/**
|
|
54
66
|
* Converts a numeric value to Polish currency words (Polish Złoty).
|
|
55
67
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -62,4 +74,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
62
74
|
* toCurrency(1.50) // 'jeden złoty pięćdziesiąt groszy'
|
|
63
75
|
* toCurrency(-5) // 'minus pięć złotych'
|
|
64
76
|
*/
|
|
65
|
-
|
|
77
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
78
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/pt-BR.d.ts
CHANGED
|
@@ -1,35 +1,47 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* Portuguese (Brazil) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: pt-BR | Brazilian Portuguese as used in Brazil
|
|
5
|
+
*
|
|
6
|
+
* Portuguese-specific rules:
|
|
7
|
+
* - "e" conjunction between units, tens and hundreds: vinte e um, cento e um
|
|
8
|
+
* - "cem" for exact 100, "cento" for 100+ remainder
|
|
9
|
+
* - Irregular hundreds: duzentos, trezentos, quatrocentos, etc.
|
|
10
|
+
* - Short scale: milhão (10^6), bilhão (10^9), trilhão (10^12)
|
|
11
|
+
* - Omit "um" before "mil"
|
|
8
12
|
*/
|
|
9
|
-
|
|
10
|
-
export const
|
|
11
|
-
export
|
|
12
|
-
/**
|
|
13
|
-
* - Include "e" between major and minor units
|
|
14
|
-
*/
|
|
15
|
-
and?: boolean | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* - Currency code (e.g., 'BRL', 'USD'); empty means auto-detect for pt-BR
|
|
18
|
-
*/
|
|
19
|
-
currency?: string | undefined;
|
|
20
|
-
};
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
21
16
|
/**
|
|
22
17
|
* Converts a numeric value to Portuguese words.
|
|
23
18
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
24
19
|
* @returns {string} The number in Portuguese words
|
|
25
20
|
*/
|
|
26
|
-
|
|
21
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
27
22
|
/**
|
|
28
23
|
* Converts a number to Portuguese ordinal words.
|
|
29
24
|
* @param {number | string | bigint} value - The number to convert
|
|
30
25
|
* @returns {string} Portuguese ordinal words
|
|
31
26
|
*/
|
|
32
|
-
|
|
27
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
28
|
+
export type CurrencyOptions = {
|
|
29
|
+
/**
|
|
30
|
+
* - Include "e" between major and minor units
|
|
31
|
+
*/
|
|
32
|
+
and?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* - Currency code (e.g., 'BRL', 'USD'); empty means auto-detect for pt-BR
|
|
35
|
+
*/
|
|
36
|
+
currency?: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @typedef {object} CurrencyOptions
|
|
40
|
+
* @property {boolean} [and] - Include "e" between major and minor units
|
|
41
|
+
* @property {string} [currency] - Currency code (e.g., 'BRL', 'USD'); empty means auto-detect for pt-BR
|
|
42
|
+
*/
|
|
43
|
+
/** @type {Required<CurrencyOptions>} */
|
|
44
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
33
45
|
/**
|
|
34
46
|
* Converts a number to Brazilian Portuguese currency words.
|
|
35
47
|
* @param {number | string | bigint} value - The amount to convert
|
|
@@ -39,4 +51,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
39
51
|
* toCurrency(42.50) // 'quarenta e dois reais e cinquenta centavos'
|
|
40
52
|
* toCurrency(42.50, {currency: 'USD'}) // 'quarenta e dois dólares e cinquenta centavos'
|
|
41
53
|
*/
|
|
42
|
-
|
|
54
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
55
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/pt-PT.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Portuguese (Portugal) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: pt-PT | European Portuguese as used in Portugal
|
|
5
|
+
*
|
|
6
|
+
* Portuguese-specific rules:
|
|
7
|
+
* - "e" conjunction everywhere: vinte e um, cento e um, mil e um
|
|
8
|
+
* - "cem" for exact 100, "cento" for 100+ remainder
|
|
9
|
+
* - Irregular hundreds: duzentos, trezentos, quatrocentos, etc.
|
|
10
|
+
* - Long scale: milhão (10^6), mil milhões (10^9), bilião (10^12)
|
|
11
|
+
* - Omit "um" before "mil"
|
|
7
12
|
*/
|
|
8
|
-
|
|
9
|
-
export const
|
|
10
|
-
export
|
|
11
|
-
/**
|
|
12
|
-
* - Include "e" between euros and cents
|
|
13
|
-
*/
|
|
14
|
-
and?: boolean | undefined;
|
|
15
|
-
};
|
|
13
|
+
export declare const cardinalMax: bigint;
|
|
14
|
+
export declare const ordinalMax: bigint;
|
|
15
|
+
export declare const currencyMax: bigint;
|
|
16
16
|
/**
|
|
17
17
|
* Converts a numeric value to Portuguese words.
|
|
18
18
|
*
|
|
@@ -27,7 +27,7 @@ export type CurrencyOptions = {
|
|
|
27
27
|
* toCardinal(100) // 'cem'
|
|
28
28
|
* toCardinal(1000000) // 'um milhão'
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
31
31
|
/**
|
|
32
32
|
* Converts a number to Portuguese ordinal words.
|
|
33
33
|
* @param {number | string | bigint} value - The number to convert
|
|
@@ -37,7 +37,19 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
37
37
|
* toOrdinal(21) // 'vigésimo primeiro'
|
|
38
38
|
* toOrdinal(100) // 'centésimo'
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
41
|
+
export type CurrencyOptions = {
|
|
42
|
+
/**
|
|
43
|
+
* - Include "e" between euros and cents
|
|
44
|
+
*/
|
|
45
|
+
and?: boolean;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @typedef {object} CurrencyOptions
|
|
49
|
+
* @property {boolean} [and] - Include "e" between euros and cents
|
|
50
|
+
*/
|
|
51
|
+
/** @type {Required<CurrencyOptions>} */
|
|
52
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
41
53
|
/**
|
|
42
54
|
* Converts a number to Portuguese currency words (Euro).
|
|
43
55
|
* @param {number | string | bigint} value - The amount to convert
|
|
@@ -48,4 +60,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
48
60
|
* toCurrency(1) // 'um euro'
|
|
49
61
|
* toCurrency(0.01) // 'um cêntimo'
|
|
50
62
|
*/
|
|
51
|
-
|
|
63
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
64
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/ro-RO.d.ts
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Romanian (Romania) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: ro-RO | Romanian as used in Romania
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Gender agreement (unu/una, doi/două)
|
|
8
|
+
* - "De" preposition insertion for groups >= 20
|
|
9
|
+
* - Complex scale word handling (mie/mii, milion/milioane)
|
|
10
|
+
* - Feminine units for thousands
|
|
7
11
|
*/
|
|
8
|
-
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
export const cardinalValues: {
|
|
12
|
-
gender: ReadonlyArray<Required<CardinalOptions>["gender"]>;
|
|
13
|
-
};
|
|
12
|
+
export declare const cardinalMax: bigint;
|
|
13
|
+
export declare const ordinalMax: bigint;
|
|
14
|
+
export declare const currencyMax: bigint;
|
|
14
15
|
export type CardinalOptions = {
|
|
15
16
|
/**
|
|
16
17
|
* - Gender for numbers
|
|
17
18
|
*/
|
|
18
|
-
gender?:
|
|
19
|
+
gender?: ('masculine' | 'feminine');
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {object} CardinalOptions
|
|
23
|
+
* @property {('masculine'|'feminine')} [gender] - Gender for numbers
|
|
24
|
+
*/
|
|
25
|
+
/** @type {Required<CardinalOptions>} */
|
|
26
|
+
export declare const cardinalDefaults: Required<CardinalOptions>;
|
|
27
|
+
/** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
|
|
28
|
+
export declare const cardinalValues: {
|
|
29
|
+
gender: ReadonlyArray<Required<CardinalOptions>['gender']>;
|
|
19
30
|
};
|
|
20
31
|
/**
|
|
21
32
|
* Converts a numeric value to Romanian words.
|
|
@@ -29,7 +40,7 @@ export type CardinalOptions = {
|
|
|
29
40
|
* toCardinal(1, { gender: 'feminine' }) // 'una'
|
|
30
41
|
* toCardinal(1000) // 'o mie'
|
|
31
42
|
*/
|
|
32
|
-
|
|
43
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
33
44
|
/**
|
|
34
45
|
* Converts a numeric value to Romanian ordinal words.
|
|
35
46
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -40,7 +51,7 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
40
51
|
* toOrdinal(1) // 'primul'
|
|
41
52
|
* toOrdinal(21) // 'douăzeci și primul'
|
|
42
53
|
*/
|
|
43
|
-
|
|
54
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
44
55
|
/**
|
|
45
56
|
* Converts a numeric value to Romanian Leu currency words.
|
|
46
57
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -51,4 +62,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
51
62
|
* toCurrency(1) // 'un leu'
|
|
52
63
|
* toCurrency(2.50) // 'doi lei cincizeci de bani'
|
|
53
64
|
*/
|
|
54
|
-
|
|
65
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
66
|
+
export { toCardinal, toOrdinal, toCurrency };
|