n2words 5.1.0 → 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 +14 -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 +2 -2
- package/dist/sr-Cyrl-RS.umd.js +2 -2
- package/dist/sr-Latn-RS.js +2 -2
- package/dist/sr-Latn-RS.umd.js +2 -2
- 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 +17 -17
- 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-Cyrl-RS.js +6 -5
- package/src/sr-Latn-RS.d.ts +40 -26
- package/src/sr-Latn-RS.js +6 -5
- 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/am-ET.d.ts
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Amharic (Ethiopia) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: am-ET | Amharic as used in Ethiopia (Ge'ez script)
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Ge'ez/Ethiopic script numerals
|
|
8
|
+
* - Teens formed with "አስራ" prefix
|
|
9
|
+
* - Keeps "one" before hundred: "አንድ መቶ" (100)
|
|
10
|
+
* - Short scale naming
|
|
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 Amharic words.
|
|
6
18
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
19
|
* @returns {string} The number in Amharic words
|
|
8
20
|
*/
|
|
9
|
-
|
|
21
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
22
|
/**
|
|
11
23
|
* Converts a numeric value to Amharic ordinal words.
|
|
12
24
|
*
|
|
@@ -22,7 +34,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
22
34
|
* toOrdinal(10) // 'አስርኛ'
|
|
23
35
|
* toOrdinal(100) // 'አንድ መቶኛ'
|
|
24
36
|
*/
|
|
25
|
-
|
|
37
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
26
38
|
/**
|
|
27
39
|
* Converts a numeric value to Amharic currency words (Ethiopian Birr).
|
|
28
40
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -35,4 +47,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
35
47
|
* toCurrency(0.99) // 'ዘጠና ዘጠኝ ሳንቲም'
|
|
36
48
|
* toCurrency(0.01) // 'አንድ ሳንቲም'
|
|
37
49
|
*/
|
|
38
|
-
|
|
50
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
51
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/am-Latn-ET.d.ts
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Amharic (Ethiopia, Latin script) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: am-Latn-ET | Amharic as used in Ethiopia (Latin script romanization)
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Romanized numerals (and, hulet, sost)
|
|
8
|
+
* - Teens formed with "asra" prefix
|
|
9
|
+
* - Keeps "one" before hundred: "and meto" (100)
|
|
10
|
+
* - Short scale naming
|
|
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 Amharic (Latin script) words.
|
|
6
18
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
19
|
* @returns {string} The number in Amharic Latin words
|
|
8
20
|
*/
|
|
9
|
-
|
|
21
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
22
|
/**
|
|
11
23
|
* Converts a numeric value to Amharic (Latin script) 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) // 'huletnya'
|
|
19
31
|
* toOrdinal(10) // 'asirnya'
|
|
20
32
|
*/
|
|
21
|
-
|
|
33
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
22
34
|
/**
|
|
23
35
|
* Converts a numeric value to Amharic (Latin script) currency words (Ethiopian Birr).
|
|
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) // 'and birr'
|
|
31
43
|
* toCurrency(0.01) // 'and santim'
|
|
32
44
|
*/
|
|
33
|
-
|
|
45
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
46
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/ar-SA.d.ts
CHANGED
|
@@ -1,42 +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
|
-
* @typedef {object} OrdinalOptions
|
|
17
|
-
* @property {('masculine'|'feminine')} [gender] - Grammatical gender
|
|
2
|
+
* Arabic (Saudi Arabia) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: ar-SA | Modern Standard Arabic as used in Saudi Arabia
|
|
5
|
+
*
|
|
6
|
+
* Self-contained converter with gender agreement and complex pluralization.
|
|
7
|
+
*
|
|
8
|
+
* Key features:
|
|
9
|
+
* - Gender agreement (masculine/feminine forms)
|
|
10
|
+
* - Complex pluralization (singular/dual/plural)
|
|
11
|
+
* - Traditional Arabic number naming conventions
|
|
12
|
+
* - "و" (and) conjunction between segments
|
|
18
13
|
*/
|
|
19
|
-
|
|
20
|
-
export const
|
|
21
|
-
|
|
22
|
-
export const ordinalValues: {
|
|
23
|
-
gender: ReadonlyArray<Required<OrdinalOptions>["gender"]>;
|
|
24
|
-
};
|
|
14
|
+
export declare const cardinalMax: bigint;
|
|
15
|
+
export declare const ordinalMax: bigint;
|
|
16
|
+
export declare const currencyMax: bigint;
|
|
25
17
|
export type CardinalOptions = {
|
|
26
18
|
/**
|
|
27
19
|
* - Grammatical gender
|
|
28
20
|
*/
|
|
29
|
-
gender?:
|
|
21
|
+
gender?: ('masculine' | 'feminine');
|
|
30
22
|
/**
|
|
31
23
|
* - Custom word for negative numbers
|
|
32
24
|
*/
|
|
33
|
-
negativeWord?: string
|
|
25
|
+
negativeWord?: string;
|
|
34
26
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @typedef {object} CardinalOptions
|
|
29
|
+
* @property {('masculine'|'feminine')} [gender] - Grammatical gender
|
|
30
|
+
* @property {string} [negativeWord] - Custom word for negative numbers
|
|
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']>;
|
|
40
37
|
};
|
|
41
38
|
/**
|
|
42
39
|
* Converts a numeric value to Arabic words.
|
|
@@ -47,7 +44,23 @@ export type OrdinalOptions = {
|
|
|
47
44
|
* toCardinal(1) // 'واحد'
|
|
48
45
|
* toCardinal(1, {gender: 'feminine'}) // 'واحدة'
|
|
49
46
|
*/
|
|
50
|
-
|
|
47
|
+
declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
|
|
48
|
+
export type OrdinalOptions = {
|
|
49
|
+
/**
|
|
50
|
+
* - Grammatical gender
|
|
51
|
+
*/
|
|
52
|
+
gender?: ('masculine' | 'feminine');
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* @typedef {object} OrdinalOptions
|
|
56
|
+
* @property {('masculine'|'feminine')} [gender] - Grammatical gender
|
|
57
|
+
*/
|
|
58
|
+
/** @type {Required<OrdinalOptions>} */
|
|
59
|
+
export declare const ordinalDefaults: Required<OrdinalOptions>;
|
|
60
|
+
/** @type {{ gender: ReadonlyArray<Required<OrdinalOptions>['gender']> }} */
|
|
61
|
+
export declare const ordinalValues: {
|
|
62
|
+
gender: ReadonlyArray<Required<OrdinalOptions>['gender']>;
|
|
63
|
+
};
|
|
51
64
|
/**
|
|
52
65
|
* Converts a numeric value to Arabic ordinal words.
|
|
53
66
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -60,7 +73,7 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
|
|
|
60
73
|
* toOrdinal(1, {gender: 'feminine'}) // 'الأولى'
|
|
61
74
|
* toOrdinal(3) // 'الثالث'
|
|
62
75
|
*/
|
|
63
|
-
|
|
76
|
+
declare function toOrdinal(value: number | string | bigint, options?: OrdinalOptions): string;
|
|
64
77
|
/**
|
|
65
78
|
* Converts a numeric value to Arabic currency words (Saudi Riyal).
|
|
66
79
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -72,4 +85,5 @@ export function toOrdinal(value: number | string | bigint, options?: OrdinalOpti
|
|
|
72
85
|
* toCurrency(1) // 'ريال واحد'
|
|
73
86
|
* toCurrency(0.01) // 'هللة واحدة'
|
|
74
87
|
*/
|
|
75
|
-
|
|
88
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
89
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/az-AZ.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Azerbaijani (Azerbaijan) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: az-AZ | Azerbaijani as used in Azerbaijan
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Turkic language patterns
|
|
8
|
+
* - Implicit "bir" (one) omission before hundreds and thousands
|
|
9
|
+
* - Short scale naming
|
|
10
|
+
*/
|
|
11
|
+
export declare const cardinalMax: bigint;
|
|
12
|
+
export declare const ordinalMax: bigint;
|
|
13
|
+
export declare const currencyMax: bigint;
|
|
4
14
|
/**
|
|
5
15
|
* Converts a numeric value to Azerbaijani words.
|
|
6
16
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
17
|
* @returns {string} The number in Azerbaijani words
|
|
8
18
|
*/
|
|
9
|
-
|
|
19
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
20
|
/**
|
|
11
21
|
* Converts a numeric value to Azerbaijani 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) // 'ikinci'
|
|
19
29
|
* toOrdinal(21) // 'iyirmibirinci'
|
|
20
30
|
*/
|
|
21
|
-
|
|
31
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
22
32
|
/**
|
|
23
33
|
* Converts a numeric value to Azerbaijani currency words (Manat).
|
|
24
34
|
*
|
|
@@ -32,4 +42,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
32
42
|
* toCurrency(1.50) // 'bir manat əlli qəpik'
|
|
33
43
|
* toCurrency(-5) // 'mənfi beş manat'
|
|
34
44
|
*/
|
|
35
|
-
|
|
45
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
46
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/bn-BD.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Bangla (Bangladesh) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: bn-BD | Bengali as used in Bangladesh
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Indian numbering system (হাজার, লাখ, কোটি)
|
|
8
|
+
* - Bangla script (Bengali)
|
|
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 Bengali words.
|
|
6
17
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
7
18
|
* @returns {string} The number in Bengali words
|
|
8
19
|
*/
|
|
9
|
-
|
|
20
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
10
21
|
/**
|
|
11
22
|
* Converts a numeric value to Bengali 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 Bengali currency words (Bangladeshi Taka).
|
|
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/cs-CZ.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Czech (Czechia) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: cs-CZ | Czech as used in Czechia
|
|
5
|
+
*
|
|
6
|
+
* Czech-specific rules:
|
|
7
|
+
* - Three-form pluralization: 1 = singular, 2-4 = few, 5+ = many
|
|
8
|
+
* - Irregular hundreds: sto, dvě stě, tři sta, čtyři sta, pět set...
|
|
9
|
+
* - Gender: dva (masc) vs dvě (fem) for 2
|
|
10
|
+
* - Omit "one" before scale words: "tisíc" not "jedna tisíc"
|
|
11
|
+
* - Dynamic decimal separator: celá/celé/celých based on integer
|
|
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 Czech words.
|
|
6
18
|
*
|
|
@@ -16,7 +28,7 @@ export const currencyMax: bigint;
|
|
|
16
28
|
* toCardinal(2000) // 'dva tisíce'
|
|
17
29
|
* toCardinal(5000) // 'pět tisíc'
|
|
18
30
|
*/
|
|
19
|
-
|
|
31
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
20
32
|
/**
|
|
21
33
|
* Converts a numeric value to Czech ordinal words (masculine nominative).
|
|
22
34
|
* @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
|
|
@@ -30,7 +42,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
30
42
|
* toOrdinal(100) // 'stý'
|
|
31
43
|
* toOrdinal(1000) // 'tisící'
|
|
32
44
|
*/
|
|
33
|
-
|
|
45
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
34
46
|
/**
|
|
35
47
|
* Converts a numeric value to Czech currency words (Koruna).
|
|
36
48
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -43,4 +55,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
43
55
|
* toCurrency(1.50) // 'jedna koruna padesát haléřů'
|
|
44
56
|
* toCurrency(-5) // 'mínus pět korun'
|
|
45
57
|
*/
|
|
46
|
-
|
|
58
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
59
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/da-DK.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Danish (Denmark) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: da-DK | Danish as used in Denmark
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Vigesimal (base-20) tens naming: halvtreds (50), treds (60), etc.
|
|
8
|
+
* - Units-before-tens: "enogtyve" (21) = one-and-twenty
|
|
9
|
+
* - Compound thousands: "ettusind", "firetusinde"
|
|
10
|
+
* - "og" conjunction after hundreds and thousands
|
|
11
|
+
* - Long scale for millions+
|
|
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 Danish 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) // 'ettusind'
|
|
13
25
|
* toCardinal(1000000) // 'en millioner'
|
|
14
26
|
*/
|
|
15
|
-
|
|
27
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
16
28
|
/**
|
|
17
29
|
* Converts a numeric value to Danish ordinal words.
|
|
18
30
|
* @param {number | string | bigint} value - The numeric value to convert (positive integer)
|
|
@@ -24,7 +36,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
24
36
|
* toOrdinal(2) // 'anden'
|
|
25
37
|
* toOrdinal(21) // 'enogtyvede'
|
|
26
38
|
*/
|
|
27
|
-
|
|
39
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
28
40
|
/**
|
|
29
41
|
* Converts a numeric value to Danish currency words (Danish Krone).
|
|
30
42
|
*
|
|
@@ -38,4 +50,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
38
50
|
* toCurrency(42) // 'toogfyrre kroner'
|
|
39
51
|
* toCurrency(1.50) // 'en krone og halvtreds øre'
|
|
40
52
|
*/
|
|
41
|
-
|
|
53
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
54
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/de-DE.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* German (Germany) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: de-DE | German as used in Germany
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Inverted tens-ones order: "einundzwanzig" (one-and-twenty) for 21-99
|
|
8
|
+
* - Compound words without spaces below million level
|
|
9
|
+
* - Three forms of 1: "eins" (standalone), "ein" (before hundert/tausend), "eine" (before Million+)
|
|
10
|
+
* - Scale pluralization: Million → Millionen, Milliarde → Milliarden
|
|
11
|
+
* - Spaces only around million+ scale words
|
|
12
|
+
* - BigInt modulo for efficient segment extraction
|
|
7
13
|
*/
|
|
8
|
-
|
|
9
|
-
export const
|
|
10
|
-
export
|
|
11
|
-
/**
|
|
12
|
-
* - Use "und" between euros and cents
|
|
13
|
-
*/
|
|
14
|
-
and?: boolean | undefined;
|
|
15
|
-
};
|
|
14
|
+
export declare const cardinalMax: bigint;
|
|
15
|
+
export declare const ordinalMax: bigint;
|
|
16
|
+
export declare const currencyMax: bigint;
|
|
16
17
|
/**
|
|
17
18
|
* Converts a numeric value to German words.
|
|
18
19
|
*
|
|
@@ -27,7 +28,7 @@ export type CurrencyOptions = {
|
|
|
27
28
|
* toCardinal(1000) // 'eintausend'
|
|
28
29
|
* toCardinal(1000000) // 'eine Million'
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
31
32
|
/**
|
|
32
33
|
* Converts a numeric value to German ordinal words.
|
|
33
34
|
*
|
|
@@ -45,7 +46,19 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
45
46
|
* toOrdinal(100) // 'einhundertste'
|
|
46
47
|
* toOrdinal(1000) // 'eintausendste'
|
|
47
48
|
*/
|
|
48
|
-
|
|
49
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
50
|
+
export type CurrencyOptions = {
|
|
51
|
+
/**
|
|
52
|
+
* - Use "und" between euros and cents
|
|
53
|
+
*/
|
|
54
|
+
and?: boolean;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @typedef {object} CurrencyOptions
|
|
58
|
+
* @property {boolean} [and] - Use "und" between euros and cents
|
|
59
|
+
*/
|
|
60
|
+
/** @type {Required<CurrencyOptions>} */
|
|
61
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
49
62
|
/**
|
|
50
63
|
* Converts a numeric value to German currency words (Euro).
|
|
51
64
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -60,4 +73,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
60
73
|
* toCurrency(0.01) // 'ein Cent'
|
|
61
74
|
* toCurrency(42.50, { and: false }) // 'zweiundvierzig Euro fünfzig Cent'
|
|
62
75
|
*/
|
|
63
|
-
|
|
76
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
77
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/el-GR.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Greek (Greece) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: el-GR | Greek as used in Greece
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Space-separated number composition
|
|
8
|
+
* - Implicit "one" (ένα) omission before scale words
|
|
9
|
+
* - Irregular hundreds (διακόσια, τριακόσια, etc.)
|
|
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 Greek words.
|
|
6
17
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -12,7 +23,7 @@ export const currencyMax: bigint;
|
|
|
12
23
|
* toCardinal(1000) // 'χίλια'
|
|
13
24
|
* toCardinal('3.14') // 'τρία κόμμα ένα τέσσερα'
|
|
14
25
|
*/
|
|
15
|
-
|
|
26
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
16
27
|
/**
|
|
17
28
|
* Converts a numeric value to Greek ordinal words.
|
|
18
29
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -23,7 +34,7 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
23
34
|
* toOrdinal(1) // 'πρώτος'
|
|
24
35
|
* toOrdinal(21) // 'εικοστός πρώτος'
|
|
25
36
|
*/
|
|
26
|
-
|
|
37
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
27
38
|
/**
|
|
28
39
|
* Converts a numeric value to Greek Euro currency words.
|
|
29
40
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -34,4 +45,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
34
45
|
* toCurrency(1) // 'ένα ευρώ'
|
|
35
46
|
* toCurrency(2.50) // 'δύο ευρώ πενήντα λεπτά'
|
|
36
47
|
*/
|
|
37
|
-
|
|
48
|
+
declare function toCurrency(value: number | string | bigint): string;
|
|
49
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/en-AU.d.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* English (Australia) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: en-AU | English as used in Australia
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Western numbering system (short scale: billion = 10^9)
|
|
8
|
+
* - British-style "and" after hundreds
|
|
9
|
+
* - Australian Dollar currency (AUD)
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
|
-
export const
|
|
10
|
-
export
|
|
11
|
-
/**
|
|
12
|
-
* - Use "and" between dollars and cents
|
|
13
|
-
*/
|
|
14
|
-
and?: boolean | undefined;
|
|
15
|
-
};
|
|
11
|
+
export declare const cardinalMax: bigint;
|
|
12
|
+
export declare const ordinalMax: bigint;
|
|
13
|
+
export declare const currencyMax: bigint;
|
|
16
14
|
/**
|
|
17
15
|
* Converts a numeric value to Australian English words.
|
|
18
16
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -24,7 +22,7 @@ export type CurrencyOptions = {
|
|
|
24
22
|
* toCardinal(101) // 'one hundred and one'
|
|
25
23
|
* toCardinal(1000000) // 'one million'
|
|
26
24
|
*/
|
|
27
|
-
|
|
25
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
28
26
|
/**
|
|
29
27
|
* Converts a numeric value to Australian English ordinal words.
|
|
30
28
|
* @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
|
|
@@ -36,7 +34,19 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
36
34
|
* toOrdinal(42) // 'forty-second'
|
|
37
35
|
* toOrdinal(100) // 'one hundredth'
|
|
38
36
|
*/
|
|
39
|
-
|
|
37
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
38
|
+
export type CurrencyOptions = {
|
|
39
|
+
/**
|
|
40
|
+
* - Use "and" between dollars and cents
|
|
41
|
+
*/
|
|
42
|
+
and?: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @typedef {object} CurrencyOptions
|
|
46
|
+
* @property {boolean} [and] - Use "and" between dollars and cents
|
|
47
|
+
*/
|
|
48
|
+
/** @type {Required<CurrencyOptions>} */
|
|
49
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
40
50
|
/**
|
|
41
51
|
* Converts a numeric value to Australian English currency words.
|
|
42
52
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -50,4 +60,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
50
60
|
* toCurrency(0.99) // 'ninety-nine cents'
|
|
51
61
|
* toCurrency(42.50, { and: false }) // 'forty-two dollars fifty cents'
|
|
52
62
|
*/
|
|
53
|
-
|
|
63
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
64
|
+
export { toCardinal, toOrdinal, toCurrency };
|
package/src/en-BD.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
export const cardinalMax: bigint;
|
|
2
|
-
export const ordinalMax: bigint;
|
|
3
|
-
export const currencyMax: bigint;
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* English (Bangladesh) language converter
|
|
3
|
+
*
|
|
4
|
+
* CLDR: en-BD | English as used in Bangladesh
|
|
5
|
+
*
|
|
6
|
+
* Key features:
|
|
7
|
+
* - Indian numbering system (thousand, lakh, crore, arab, kharab)
|
|
8
|
+
* - 3-2-2 grouping pattern (last 3 digits, then groups of 2)
|
|
9
|
+
* - British-style "and" after hundreds
|
|
10
|
+
* - Bangladeshi Taka currency (BDT)
|
|
7
11
|
*/
|
|
8
|
-
|
|
9
|
-
export const
|
|
10
|
-
export
|
|
11
|
-
/**
|
|
12
|
-
* - Use "and" between taka and paise
|
|
13
|
-
*/
|
|
14
|
-
and?: boolean | undefined;
|
|
15
|
-
};
|
|
12
|
+
export declare const cardinalMax: bigint;
|
|
13
|
+
export declare const ordinalMax: bigint;
|
|
14
|
+
export declare const currencyMax: bigint;
|
|
16
15
|
/**
|
|
17
16
|
* Converts a numeric value to English words using Indian numbering.
|
|
18
17
|
* @param {number | string | bigint} value - The numeric value to convert
|
|
@@ -25,7 +24,7 @@ export type CurrencyOptions = {
|
|
|
25
24
|
* toCardinal(10000000) // 'one crore'
|
|
26
25
|
* toCardinal(1234567) // 'twelve lakh thirty-four thousand five hundred and sixty-seven'
|
|
27
26
|
*/
|
|
28
|
-
|
|
27
|
+
declare function toCardinal(value: number | string | bigint): string;
|
|
29
28
|
/**
|
|
30
29
|
* Converts a numeric value to English ordinal words using Indian numbering.
|
|
31
30
|
* @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
|
|
@@ -37,7 +36,19 @@ export function toCardinal(value: number | string | bigint): string;
|
|
|
37
36
|
* toOrdinal(100000) // 'one lakhth'
|
|
38
37
|
* toOrdinal(100001) // 'one lakh first'
|
|
39
38
|
*/
|
|
40
|
-
|
|
39
|
+
declare function toOrdinal(value: number | string | bigint): string;
|
|
40
|
+
export type CurrencyOptions = {
|
|
41
|
+
/**
|
|
42
|
+
* - Use "and" between taka and paise
|
|
43
|
+
*/
|
|
44
|
+
and?: boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @typedef {object} CurrencyOptions
|
|
48
|
+
* @property {boolean} [and] - Use "and" between taka and paise
|
|
49
|
+
*/
|
|
50
|
+
/** @type {Required<CurrencyOptions>} */
|
|
51
|
+
export declare const currencyDefaults: Required<CurrencyOptions>;
|
|
41
52
|
/**
|
|
42
53
|
* Converts a numeric value to Bangladeshi English currency words.
|
|
43
54
|
* @param {number | string | bigint} value - The currency amount to convert
|
|
@@ -52,4 +63,5 @@ export function toOrdinal(value: number | string | bigint): string;
|
|
|
52
63
|
* toCurrency(0.50) // 'fifty paise'
|
|
53
64
|
* toCurrency(42.50, { and: false }) // 'forty-two taka fifty paise'
|
|
54
65
|
*/
|
|
55
|
-
|
|
66
|
+
declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
|
|
67
|
+
export { toCardinal, toOrdinal, toCurrency };
|