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.
Files changed (227) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/am-ET.js +1 -1
  3. package/dist/am-ET.umd.js +1 -1
  4. package/dist/am-Latn-ET.js +1 -1
  5. package/dist/am-Latn-ET.umd.js +1 -1
  6. package/dist/ar-SA.js +1 -1
  7. package/dist/ar-SA.umd.js +1 -1
  8. package/dist/az-AZ.js +1 -1
  9. package/dist/az-AZ.umd.js +1 -1
  10. package/dist/bn-BD.js +1 -1
  11. package/dist/bn-BD.umd.js +1 -1
  12. package/dist/cs-CZ.js +1 -1
  13. package/dist/cs-CZ.umd.js +1 -1
  14. package/dist/da-DK.js +1 -1
  15. package/dist/da-DK.umd.js +1 -1
  16. package/dist/de-DE.js +1 -1
  17. package/dist/de-DE.umd.js +1 -1
  18. package/dist/el-GR.js +1 -1
  19. package/dist/el-GR.umd.js +1 -1
  20. package/dist/en-AU.js +1 -1
  21. package/dist/en-AU.umd.js +1 -1
  22. package/dist/en-BD.js +1 -1
  23. package/dist/en-BD.umd.js +1 -1
  24. package/dist/en-CA.js +1 -1
  25. package/dist/en-CA.umd.js +1 -1
  26. package/dist/en-GB.js +1 -1
  27. package/dist/en-GB.umd.js +1 -1
  28. package/dist/en-GH.js +1 -1
  29. package/dist/en-GH.umd.js +1 -1
  30. package/dist/en-IE.js +1 -1
  31. package/dist/en-IE.umd.js +1 -1
  32. package/dist/en-IN.js +1 -1
  33. package/dist/en-IN.umd.js +1 -1
  34. package/dist/en-KE.js +1 -1
  35. package/dist/en-KE.umd.js +1 -1
  36. package/dist/en-MY.js +1 -1
  37. package/dist/en-MY.umd.js +1 -1
  38. package/dist/en-NG.js +1 -1
  39. package/dist/en-NG.umd.js +1 -1
  40. package/dist/en-NZ.js +1 -1
  41. package/dist/en-NZ.umd.js +1 -1
  42. package/dist/en-PH.js +1 -1
  43. package/dist/en-PH.umd.js +1 -1
  44. package/dist/en-PK.js +1 -1
  45. package/dist/en-PK.umd.js +1 -1
  46. package/dist/en-SG.js +1 -1
  47. package/dist/en-SG.umd.js +1 -1
  48. package/dist/en-US.js +1 -1
  49. package/dist/en-US.umd.js +1 -1
  50. package/dist/en-ZA.js +1 -1
  51. package/dist/en-ZA.umd.js +1 -1
  52. package/dist/es-ES.js +1 -1
  53. package/dist/es-ES.umd.js +1 -1
  54. package/dist/es-MX.js +1 -1
  55. package/dist/es-MX.umd.js +1 -1
  56. package/dist/es-US.js +1 -1
  57. package/dist/es-US.umd.js +1 -1
  58. package/dist/fa-IR.js +1 -1
  59. package/dist/fa-IR.umd.js +1 -1
  60. package/dist/fi-FI.js +1 -1
  61. package/dist/fi-FI.umd.js +1 -1
  62. package/dist/fil-PH.js +1 -1
  63. package/dist/fil-PH.umd.js +1 -1
  64. package/dist/fr-BE.js +1 -1
  65. package/dist/fr-BE.umd.js +1 -1
  66. package/dist/fr-FR.js +1 -1
  67. package/dist/fr-FR.umd.js +1 -1
  68. package/dist/gu-IN.js +1 -1
  69. package/dist/gu-IN.umd.js +1 -1
  70. package/dist/ha-NG.js +1 -1
  71. package/dist/ha-NG.umd.js +1 -1
  72. package/dist/hbo-IL.js +1 -1
  73. package/dist/hbo-IL.umd.js +1 -1
  74. package/dist/he-IL.js +1 -1
  75. package/dist/he-IL.umd.js +1 -1
  76. package/dist/hi-IN.js +1 -1
  77. package/dist/hi-IN.umd.js +1 -1
  78. package/dist/hr-HR.js +2 -2
  79. package/dist/hr-HR.umd.js +2 -2
  80. package/dist/hu-HU.js +1 -1
  81. package/dist/hu-HU.umd.js +1 -1
  82. package/dist/id-ID.js +1 -1
  83. package/dist/id-ID.umd.js +1 -1
  84. package/dist/it-IT.js +1 -1
  85. package/dist/it-IT.umd.js +1 -1
  86. package/dist/ja-JP.js +1 -1
  87. package/dist/ja-JP.umd.js +1 -1
  88. package/dist/ka-GE.js +1 -1
  89. package/dist/ka-GE.umd.js +1 -1
  90. package/dist/kn-IN.js +1 -1
  91. package/dist/kn-IN.umd.js +1 -1
  92. package/dist/ko-KR.js +1 -1
  93. package/dist/ko-KR.umd.js +1 -1
  94. package/dist/lt-LT.js +1 -1
  95. package/dist/lt-LT.umd.js +1 -1
  96. package/dist/lv-LV.js +1 -1
  97. package/dist/lv-LV.umd.js +1 -1
  98. package/dist/mr-IN.js +1 -1
  99. package/dist/mr-IN.umd.js +1 -1
  100. package/dist/ms-MY.js +1 -1
  101. package/dist/ms-MY.umd.js +1 -1
  102. package/dist/nb-NO.js +1 -1
  103. package/dist/nb-NO.umd.js +1 -1
  104. package/dist/nl-NL.js +1 -1
  105. package/dist/nl-NL.umd.js +1 -1
  106. package/dist/pa-IN.js +1 -1
  107. package/dist/pa-IN.umd.js +1 -1
  108. package/dist/pl-PL.js +1 -1
  109. package/dist/pl-PL.umd.js +1 -1
  110. package/dist/pt-BR.js +1 -1
  111. package/dist/pt-BR.umd.js +1 -1
  112. package/dist/pt-PT.js +1 -1
  113. package/dist/pt-PT.umd.js +1 -1
  114. package/dist/ro-RO.js +1 -1
  115. package/dist/ro-RO.umd.js +1 -1
  116. package/dist/ru-RU.js +1 -1
  117. package/dist/ru-RU.umd.js +1 -1
  118. package/dist/sr-Cyrl-RS.js +1 -1
  119. package/dist/sr-Cyrl-RS.umd.js +1 -1
  120. package/dist/sr-Latn-RS.js +1 -1
  121. package/dist/sr-Latn-RS.umd.js +1 -1
  122. package/dist/sv-SE.js +1 -1
  123. package/dist/sv-SE.umd.js +1 -1
  124. package/dist/sw-KE.js +1 -1
  125. package/dist/sw-KE.umd.js +1 -1
  126. package/dist/ta-IN.js +1 -1
  127. package/dist/ta-IN.umd.js +1 -1
  128. package/dist/te-IN.js +1 -1
  129. package/dist/te-IN.umd.js +1 -1
  130. package/dist/th-TH.js +1 -1
  131. package/dist/th-TH.umd.js +1 -1
  132. package/dist/tr-TR.js +1 -1
  133. package/dist/tr-TR.umd.js +1 -1
  134. package/dist/uk-UA.js +1 -1
  135. package/dist/uk-UA.umd.js +1 -1
  136. package/dist/ur-PK.js +1 -1
  137. package/dist/ur-PK.umd.js +1 -1
  138. package/dist/vi-VN.js +1 -1
  139. package/dist/vi-VN.umd.js +1 -1
  140. package/dist/yo-NG.js +1 -1
  141. package/dist/yo-NG.umd.js +1 -1
  142. package/dist/zh-Hans-CN.js +1 -1
  143. package/dist/zh-Hans-CN.umd.js +1 -1
  144. package/dist/zh-Hant-TW.js +1 -1
  145. package/dist/zh-Hant-TW.umd.js +1 -1
  146. package/package.json +13 -13
  147. package/src/am-ET.d.ts +19 -6
  148. package/src/am-Latn-ET.d.ts +19 -6
  149. package/src/ar-SA.d.ts +46 -32
  150. package/src/az-AZ.d.ts +17 -6
  151. package/src/bn-BD.d.ts +18 -6
  152. package/src/cs-CZ.d.ts +19 -6
  153. package/src/da-DK.d.ts +19 -6
  154. package/src/de-DE.d.ts +30 -16
  155. package/src/el-GR.d.ts +18 -6
  156. package/src/en-AU.d.ts +27 -16
  157. package/src/en-BD.d.ts +28 -16
  158. package/src/en-CA.d.ts +46 -25
  159. package/src/en-GB.d.ts +28 -16
  160. package/src/en-GH.d.ts +35 -16
  161. package/src/en-IE.d.ts +38 -16
  162. package/src/en-IN.d.ts +28 -16
  163. package/src/en-KE.d.ts +35 -16
  164. package/src/en-MY.d.ts +38 -16
  165. package/src/en-NG.d.ts +38 -16
  166. package/src/en-NZ.d.ts +35 -16
  167. package/src/en-PH.d.ts +35 -16
  168. package/src/en-PK.d.ts +28 -16
  169. package/src/en-SG.d.ts +35 -16
  170. package/src/en-US.d.ts +44 -25
  171. package/src/en-ZA.d.ts +37 -16
  172. package/src/es-ES.d.ts +61 -42
  173. package/src/es-MX.d.ts +61 -42
  174. package/src/es-US.d.ts +61 -42
  175. package/src/fa-IR.d.ts +17 -6
  176. package/src/fi-FI.d.ts +19 -6
  177. package/src/fil-PH.d.ts +18 -6
  178. package/src/fr-BE.d.ts +35 -23
  179. package/src/fr-FR.d.ts +36 -23
  180. package/src/gu-IN.d.ts +19 -6
  181. package/src/ha-NG.d.ts +21 -6
  182. package/src/hbo-IL.d.ts +30 -17
  183. package/src/he-IL.d.ts +24 -11
  184. package/src/hi-IN.d.ts +19 -6
  185. package/src/hr-HR.d.ts +28 -15
  186. package/src/hr-HR.js +8 -6
  187. package/src/hu-HU.d.ts +18 -6
  188. package/src/id-ID.d.ts +18 -6
  189. package/src/it-IT.d.ts +30 -16
  190. package/src/ja-JP.d.ts +18 -6
  191. package/src/ka-GE.d.ts +20 -6
  192. package/src/kn-IN.d.ts +19 -6
  193. package/src/ko-KR.d.ts +18 -6
  194. package/src/lt-LT.d.ts +27 -15
  195. package/src/lv-LV.d.ts +28 -15
  196. package/src/mr-IN.d.ts +19 -6
  197. package/src/ms-MY.d.ts +18 -6
  198. package/src/nb-NO.d.ts +18 -6
  199. package/src/nl-NL.d.ts +42 -27
  200. package/src/pa-IN.d.ts +18 -6
  201. package/src/pl-PL.d.ts +28 -15
  202. package/src/pt-BR.d.ts +34 -21
  203. package/src/pt-PT.d.ts +29 -16
  204. package/src/ro-RO.d.ts +27 -15
  205. package/src/ru-RU.d.ts +38 -26
  206. package/src/sr-Cyrl-RS.d.ts +40 -26
  207. package/src/sr-Latn-RS.d.ts +40 -26
  208. package/src/sv-SE.d.ts +19 -6
  209. package/src/sw-KE.d.ts +17 -6
  210. package/src/ta-IN.d.ts +21 -6
  211. package/src/te-IN.d.ts +19 -6
  212. package/src/th-TH.d.ts +19 -6
  213. package/src/tr-TR.d.ts +22 -11
  214. package/src/uk-UA.d.ts +27 -15
  215. package/src/ur-PK.d.ts +18 -6
  216. package/src/utils/check-max.d.ts +1 -1
  217. package/src/utils/expand-scientific.d.ts +3 -3
  218. package/src/utils/is-plain-object.d.ts +1 -1
  219. package/src/utils/parse-cardinal.d.ts +7 -1
  220. package/src/utils/parse-currency.d.ts +6 -1
  221. package/src/utils/parse-ordinal.d.ts +6 -1
  222. package/src/utils/resolve-options.d.ts +1 -1
  223. package/src/utils/scale.d.ts +22 -22
  224. package/src/vi-VN.d.ts +17 -6
  225. package/src/yo-NG.d.ts +24 -6
  226. package/src/zh-Hans-CN.d.ts +46 -34
  227. package/src/zh-Hant-TW.d.ts +50 -34
package/src/ru-RU.d.ts CHANGED
@@ -1,33 +1,32 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
4
1
  /**
5
- * @typedef {object} CardinalOptions
6
- * @property {('masculine'|'feminine')} [gender] - Grammatical gender
2
+ * Russian (Russia) language converter
3
+ *
4
+ * CLDR: ru-RU | Russian as used in Russia
5
+ *
6
+ * Key features:
7
+ * - Three-form pluralization (one/few/many)
8
+ * - Gender: thousands are feminine, millions+ are masculine
9
+ * - Irregular hundreds (двести, триста, etc.)
10
+ * - Long scale naming
7
11
  */
8
- /** @type {Required<CardinalOptions>} */
9
- export const cardinalDefaults: Required<CardinalOptions>;
10
- /** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
11
- export const cardinalValues: {
12
- gender: ReadonlyArray<Required<CardinalOptions>["gender"]>;
13
- };
14
- /**
15
- * @typedef {object} CurrencyOptions
16
- * @property {boolean} [and] - Use "и" between rubles and kopecks
17
- */
18
- /** @type {Required<CurrencyOptions>} */
19
- export const currencyDefaults: Required<CurrencyOptions>;
12
+ export declare const cardinalMax: bigint;
13
+ export declare const ordinalMax: bigint;
14
+ export declare const currencyMax: bigint;
20
15
  export type CardinalOptions = {
21
16
  /**
22
17
  * - Grammatical gender
23
18
  */
24
- gender?: "feminine" | "masculine" | undefined;
19
+ gender?: ('masculine' | 'feminine');
25
20
  };
26
- export type CurrencyOptions = {
27
- /**
28
- * - Use "и" between rubles and kopecks
29
- */
30
- and?: boolean | undefined;
21
+ /**
22
+ * @typedef {object} CardinalOptions
23
+ * @property {('masculine'|'feminine')} [gender] - Grammatical gender
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']>;
31
30
  };
32
31
  /**
33
32
  * Converts a numeric value to Russian words.
@@ -35,7 +34,7 @@ export type CurrencyOptions = {
35
34
  * @param {CardinalOptions} [options] - Optional configuration
36
35
  * @returns {string} The number in Russian words
37
36
  */
38
- export function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
37
+ declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
39
38
  /**
40
39
  * Converts a numeric value to Russian ordinal words (masculine nominative).
41
40
  * @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
@@ -52,7 +51,19 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
52
51
  * toOrdinal(101) // 'сто первый'
53
52
  * toOrdinal(1000) // 'тысячный'
54
53
  */
55
- export function toOrdinal(value: number | string | bigint): string;
54
+ declare function toOrdinal(value: number | string | bigint): string;
55
+ export type CurrencyOptions = {
56
+ /**
57
+ * - Use "и" between rubles and kopecks
58
+ */
59
+ and?: boolean;
60
+ };
61
+ /**
62
+ * @typedef {object} CurrencyOptions
63
+ * @property {boolean} [and] - Use "и" between rubles and kopecks
64
+ */
65
+ /** @type {Required<CurrencyOptions>} */
66
+ export declare const currencyDefaults: Required<CurrencyOptions>;
56
67
  /**
57
68
  * Converts a numeric value to Russian currency words (Russian Ruble).
58
69
  * @param {number | string | bigint} value - The currency amount to convert
@@ -67,4 +78,5 @@ export function toOrdinal(value: number | string | bigint): string;
67
78
  * toCurrency(0.01) // 'одна копейка'
68
79
  * toCurrency(42.50, { and: false }) // 'сорок два рубля пятьдесят копеек'
69
80
  */
70
- export function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
81
+ declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
82
+ export { toCardinal, toOrdinal, toCurrency };
@@ -1,33 +1,34 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
4
1
  /**
5
- * @typedef {object} CardinalOptions
6
- * @property {('masculine'|'feminine')} [gender] - Grammatical gender
2
+ * Serbian (Serbia, Cyrillic script) language converter
3
+ *
4
+ * CLDR: sr-Cyrl-RS | Serbian as used in Serbia (Cyrillic script)
5
+ *
6
+ * Key features:
7
+ * - Three-form pluralization (one/few/many)
8
+ * - Gender by scale word: the -arda forms (hiljada, milijarda, bilijarda, ...)
9
+ * are feminine; the -ion forms (milion, bilion, ...) are masculine
10
+ * - Irregular hundreds
11
+ * - Long scale naming with -ard forms
12
+ * - Cyrillic script
7
13
  */
8
- /** @type {Required<CardinalOptions>} */
9
- export const cardinalDefaults: Required<CardinalOptions>;
10
- /** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
11
- export const cardinalValues: {
12
- gender: ReadonlyArray<Required<CardinalOptions>["gender"]>;
13
- };
14
- /**
15
- * @typedef {object} CurrencyOptions
16
- * @property {boolean} [and] - Use "и" between dinars and para
17
- */
18
- /** @type {Required<CurrencyOptions>} */
19
- export const currencyDefaults: Required<CurrencyOptions>;
14
+ export declare const cardinalMax: bigint;
15
+ export declare const ordinalMax: bigint;
16
+ export declare const currencyMax: bigint;
20
17
  export type CardinalOptions = {
21
18
  /**
22
19
  * - Grammatical gender
23
20
  */
24
- gender?: "feminine" | "masculine" | undefined;
21
+ gender?: ('masculine' | 'feminine');
25
22
  };
26
- export type CurrencyOptions = {
27
- /**
28
- * - Use "и" between dinars and para
29
- */
30
- and?: boolean | undefined;
23
+ /**
24
+ * @typedef {object} CardinalOptions
25
+ * @property {('masculine'|'feminine')} [gender] - Grammatical gender
26
+ */
27
+ /** @type {Required<CardinalOptions>} */
28
+ export declare const cardinalDefaults: Required<CardinalOptions>;
29
+ /** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
30
+ export declare const cardinalValues: {
31
+ gender: ReadonlyArray<Required<CardinalOptions>['gender']>;
31
32
  };
32
33
  /**
33
34
  * Converts a numeric value to Serbian (Cyrillic) words.
@@ -35,7 +36,7 @@ export type CurrencyOptions = {
35
36
  * @param {CardinalOptions} [options] - Optional configuration
36
37
  * @returns {string} The number in Serbian Cyrillic words
37
38
  */
38
- export function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
39
+ declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
39
40
  /**
40
41
  * Converts a numeric value to Serbian ordinal words (masculine nominative).
41
42
  * @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
@@ -51,7 +52,19 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
51
52
  * toOrdinal(100) // 'стоти'
52
53
  * toOrdinal(1000) // 'хиљадити'
53
54
  */
54
- export function toOrdinal(value: number | string | bigint): string;
55
+ declare function toOrdinal(value: number | string | bigint): string;
56
+ export type CurrencyOptions = {
57
+ /**
58
+ * - Use "и" between dinars and para
59
+ */
60
+ and?: boolean;
61
+ };
62
+ /**
63
+ * @typedef {object} CurrencyOptions
64
+ * @property {boolean} [and] - Use "и" between dinars and para
65
+ */
66
+ /** @type {Required<CurrencyOptions>} */
67
+ export declare const currencyDefaults: Required<CurrencyOptions>;
55
68
  /**
56
69
  * Converts a numeric value to Serbian currency words (Serbian Dinar).
57
70
  * @param {number | string | bigint} value - The currency amount to convert
@@ -66,4 +79,5 @@ export function toOrdinal(value: number | string | bigint): string;
66
79
  * toCurrency(0.01) // 'једна пара'
67
80
  * toCurrency(42.50, { and: false }) // 'четрдесет два динара педесет пара'
68
81
  */
69
- export function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
82
+ declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
83
+ export { toCardinal, toOrdinal, toCurrency };
@@ -1,33 +1,34 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
4
1
  /**
5
- * @typedef {object} CardinalOptions
6
- * @property {('masculine'|'feminine')} [gender] - Grammatical gender
2
+ * Serbian (Serbia, Latin script) language converter
3
+ *
4
+ * CLDR: sr-Latn-RS | Serbian as used in Serbia (Latin script)
5
+ *
6
+ * Key features:
7
+ * - Three-form pluralization (one/few/many)
8
+ * - Gender by scale word: the -arda forms (hiljada, milijarda, bilijarda, ...)
9
+ * are feminine; the -ion forms (milion, bilion, ...) are masculine
10
+ * - Irregular hundreds (dvesta, trista, etc.)
11
+ * - Long scale naming with -ard forms
12
+ * - Latin script
7
13
  */
8
- /** @type {Required<CardinalOptions>} */
9
- export const cardinalDefaults: Required<CardinalOptions>;
10
- /** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
11
- export const cardinalValues: {
12
- gender: ReadonlyArray<Required<CardinalOptions>["gender"]>;
13
- };
14
- /**
15
- * @typedef {object} CurrencyOptions
16
- * @property {boolean} [and] - Use "i" between dinars and para
17
- */
18
- /** @type {Required<CurrencyOptions>} */
19
- export const currencyDefaults: Required<CurrencyOptions>;
14
+ export declare const cardinalMax: bigint;
15
+ export declare const ordinalMax: bigint;
16
+ export declare const currencyMax: bigint;
20
17
  export type CardinalOptions = {
21
18
  /**
22
19
  * - Grammatical gender
23
20
  */
24
- gender?: "feminine" | "masculine" | undefined;
21
+ gender?: ('masculine' | 'feminine');
25
22
  };
26
- export type CurrencyOptions = {
27
- /**
28
- * - Use "i" between dinars and para
29
- */
30
- and?: boolean | undefined;
23
+ /**
24
+ * @typedef {object} CardinalOptions
25
+ * @property {('masculine'|'feminine')} [gender] - Grammatical gender
26
+ */
27
+ /** @type {Required<CardinalOptions>} */
28
+ export declare const cardinalDefaults: Required<CardinalOptions>;
29
+ /** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
30
+ export declare const cardinalValues: {
31
+ gender: ReadonlyArray<Required<CardinalOptions>['gender']>;
31
32
  };
32
33
  /**
33
34
  * Converts a numeric value to Serbian (Latin) words.
@@ -35,7 +36,7 @@ export type CurrencyOptions = {
35
36
  * @param {CardinalOptions} [options] - Optional configuration
36
37
  * @returns {string} The number in Serbian Latin words
37
38
  */
38
- export function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
39
+ declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
39
40
  /**
40
41
  * Converts a numeric value to Serbian ordinal words (masculine nominative).
41
42
  * @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
@@ -51,7 +52,19 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
51
52
  * toOrdinal(100) // 'stoti'
52
53
  * toOrdinal(1000) // 'hiljaditi'
53
54
  */
54
- export function toOrdinal(value: number | string | bigint): string;
55
+ declare function toOrdinal(value: number | string | bigint): string;
56
+ export type CurrencyOptions = {
57
+ /**
58
+ * - Use "i" between dinars and para
59
+ */
60
+ and?: boolean;
61
+ };
62
+ /**
63
+ * @typedef {object} CurrencyOptions
64
+ * @property {boolean} [and] - Use "i" between dinars and para
65
+ */
66
+ /** @type {Required<CurrencyOptions>} */
67
+ export declare const currencyDefaults: Required<CurrencyOptions>;
55
68
  /**
56
69
  * Converts a numeric value to Serbian currency words (Serbian Dinar).
57
70
  * @param {number | string | bigint} value - The currency amount to convert
@@ -66,4 +79,5 @@ export function toOrdinal(value: number | string | bigint): string;
66
79
  * toCurrency(0.01) // 'jedna para'
67
80
  * toCurrency(42.50, { and: false }) // 'četrdeset dva dinara pedeset para'
68
81
  */
69
- export function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
82
+ declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string;
83
+ export { toCardinal, toOrdinal, toCurrency };
package/src/sv-SE.d.ts CHANGED
@@ -1,6 +1,18 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
1
+ /**
2
+ * Swedish (Sweden) language converter
3
+ *
4
+ * CLDR: sv-SE | Swedish as used in Sweden
5
+ *
6
+ * Key features:
7
+ * - Hyphenation for tens-ones (tjugo-ett)
8
+ * - "och" after hundreds before small numbers
9
+ * - Omit "ett" before hundra and tusen
10
+ * - Use "en" (not "ett") before million+ scales
11
+ * - Long scale naming with -ard forms
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 Swedish words.
6
18
  * @param {number | string | bigint} value - The numeric value to convert
@@ -12,7 +24,7 @@ export const currencyMax: bigint;
12
24
  * toCardinal(101) // 'hundra och ett'
13
25
  * toCardinal(1000000) // 'en miljon'
14
26
  */
15
- export function toCardinal(value: number | string | bigint): string;
27
+ declare function toCardinal(value: number | string | bigint): string;
16
28
  /**
17
29
  * Converts a numeric value to Swedish 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) // 'andra'
25
37
  * toOrdinal(21) // 'tjugo-ettde'
26
38
  */
27
- export function toOrdinal(value: number | string | bigint): string;
39
+ declare function toOrdinal(value: number | string | bigint): string;
28
40
  /**
29
41
  * Converts a numeric value to Swedish currency words (Swedish Krona).
30
42
  *
@@ -38,4 +50,5 @@ export function toOrdinal(value: number | string | bigint): string;
38
50
  * toCurrency(42) // 'fyrtio-två kronor'
39
51
  * toCurrency(1.50) // 'en krona och femtio öre'
40
52
  */
41
- export function toCurrency(value: number | string | bigint): string;
53
+ declare function toCurrency(value: number | string | bigint): string;
54
+ export { toCardinal, toOrdinal, toCurrency };
package/src/sw-KE.d.ts CHANGED
@@ -1,12 +1,22 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
1
+ /**
2
+ * Swahili (Kenya) language converter
3
+ *
4
+ * CLDR: sw-KE | Swahili as used in Kenya
5
+ *
6
+ * Key features:
7
+ * - "na" connector for compound numbers
8
+ * - Reversed hundreds: "mia moja" (one hundred)
9
+ * - Scale words: elfu, milioni, bilioni
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 Swahili words.
6
16
  * @param {number | string | bigint} value - The numeric value to convert
7
17
  * @returns {string} The number in Swahili words
8
18
  */
9
- export function toCardinal(value: number | string | bigint): string;
19
+ declare function toCardinal(value: number | string | bigint): string;
10
20
  /**
11
21
  * Converts a numeric value to Swahili 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) // 'wa pili'
19
29
  * toOrdinal(10) // 'wa kumi'
20
30
  */
21
- export function toOrdinal(value: number | string | bigint): string;
31
+ declare function toOrdinal(value: number | string | bigint): string;
22
32
  /**
23
33
  * Converts a numeric value to Swahili currency words (Kenyan Shilling).
24
34
  *
@@ -32,4 +42,5 @@ export function toOrdinal(value: number | string | bigint): string;
32
42
  * toCurrency(1.50) // 'shilingi moja na senti hamsini'
33
43
  * toCurrency(-5) // 'minus shilingi tano'
34
44
  */
35
- export function toCurrency(value: number | string | bigint): string;
45
+ declare function toCurrency(value: number | string | bigint): string;
46
+ export { toCardinal, toOrdinal, toCurrency };
package/src/ta-IN.d.ts CHANGED
@@ -1,12 +1,26 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
1
+ /**
2
+ * Tamil (India) language converter
3
+ *
4
+ * CLDR: ta-IN | Tamil as used in India
5
+ *
6
+ * Key features:
7
+ * - Indian numbering system (ஆயிரம், லட்சம், கோடி)
8
+ * - Tamil script
9
+ * - 3-2-2 grouping pattern
10
+ * - Complete word forms for 0-99
11
+ * - Special hundred word transformations (connected vs standalone)
12
+ * - Per-digit decimal reading
13
+ * - BigInt modulo for efficient segment extraction
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 Tamil words.
6
20
  * @param {number | string | bigint} value - The numeric value to convert
7
21
  * @returns {string} The number in Tamil words
8
22
  */
9
- export function toCardinal(value: number | string | bigint): string;
23
+ declare function toCardinal(value: number | string | bigint): string;
10
24
  /**
11
25
  * Converts a numeric value to Tamil 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) // 'இரண்டாவது'
19
33
  * toOrdinal(10) // 'பத்துஆவது'
20
34
  */
21
- export function toOrdinal(value: number | string | bigint): string;
35
+ declare function toOrdinal(value: number | string | bigint): string;
22
36
  /**
23
37
  * Converts a numeric value to Tamil currency words (Indian Rupee).
24
38
  * @param {number | string | bigint} value - The currency amount to convert
@@ -30,4 +44,5 @@ export function toOrdinal(value: number | string | bigint): string;
30
44
  * toCurrency(1) // 'ஒன்று ரூபாய்'
31
45
  * toCurrency(0.01) // 'ஒன்று பைசா'
32
46
  */
33
- export function toCurrency(value: number | string | bigint): string;
47
+ declare function toCurrency(value: number | string | bigint): string;
48
+ export { toCardinal, toOrdinal, toCurrency };
package/src/te-IN.d.ts CHANGED
@@ -1,12 +1,24 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
1
+ /**
2
+ * Telugu (India) language converter
3
+ *
4
+ * CLDR: te-IN | Telugu as used in India
5
+ *
6
+ * Key features:
7
+ * - Indian numbering system (వెయ్యి, లక్ష, కోటి)
8
+ * - Telugu script
9
+ * - 3-2-2 grouping pattern
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 Telugu words.
6
18
  * @param {number | string | bigint} value - The numeric value to convert
7
19
  * @returns {string} The number in Telugu words
8
20
  */
9
- export function toCardinal(value: number | string | bigint): string;
21
+ declare function toCardinal(value: number | string | bigint): string;
10
22
  /**
11
23
  * Converts a numeric value to Telugu 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
- export function toOrdinal(value: number | string | bigint): string;
33
+ declare function toOrdinal(value: number | string | bigint): string;
22
34
  /**
23
35
  * Converts a numeric value to Telugu 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
- export function toCurrency(value: number | string | bigint): string;
45
+ declare function toCurrency(value: number | string | bigint): string;
46
+ export { toCardinal, toOrdinal, toCurrency };
package/src/th-TH.d.ts CHANGED
@@ -1,12 +1,24 @@
1
- export const cardinalMax: null;
2
- export const ordinalMax: null;
3
- export const currencyMax: null;
1
+ /**
2
+ * Thai (Thailand) language converter
3
+ *
4
+ * CLDR: th-TH | Thai as used in Thailand
5
+ *
6
+ * Key features:
7
+ * - No word separators (continuous Thai script)
8
+ * - Million-based grouping (ล้าน)
9
+ * - Special handling for 1 as "เอ็ด" in compounds
10
+ * - 20 is "ยี่สิบ" (not "สองสิบ")
11
+ * - Per-digit decimal reading
12
+ */
13
+ export declare const cardinalMax: null;
14
+ export declare const ordinalMax: null;
15
+ export declare const currencyMax: null;
4
16
  /**
5
17
  * Converts a numeric value to Thai words.
6
18
  * @param {number | string | bigint} value - The numeric value to convert
7
19
  * @returns {string} The number in Thai words
8
20
  */
9
- export function toCardinal(value: number | string | bigint): string;
21
+ declare function toCardinal(value: number | string | bigint): string;
10
22
  /**
11
23
  * Converts a numeric value to Thai 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
- export function toOrdinal(value: number | string | bigint): string;
33
+ declare function toOrdinal(value: number | string | bigint): string;
22
34
  /**
23
35
  * Converts a numeric value to Thai currency words (Baht).
24
36
  *
@@ -33,4 +45,5 @@ export function toOrdinal(value: number | string | bigint): string;
33
45
  * toCurrency(1.50) // 'หนึ่งบาทห้าสิบสตางค์'
34
46
  * toCurrency(-5) // 'ลบห้าบาทถ้วน'
35
47
  */
36
- export function toCurrency(value: number | string | bigint): string;
48
+ declare function toCurrency(value: number | string | bigint): string;
49
+ export { toCardinal, toOrdinal, toCurrency };
package/src/tr-TR.d.ts CHANGED
@@ -1,18 +1,28 @@
1
- export const cardinalMax: bigint;
2
- export const ordinalMax: bigint;
3
- export const currencyMax: bigint;
4
1
  /**
5
- * @typedef {object} CardinalOptions
6
- * @property {boolean} [dropSpaces] - Remove spaces for compound form
2
+ * Turkish (Turkey) language converter
3
+ *
4
+ * CLDR: tr-TR | Turkish as used in Turkey
5
+ *
6
+ * Key features:
7
+ * - Omits 'bir' (one) before hundreds and thousands
8
+ * - Optional dropSpaces for compound form
9
+ * - Short scale naming
7
10
  */
8
- /** @type {Required<CardinalOptions>} */
9
- export const cardinalDefaults: Required<CardinalOptions>;
11
+ export declare const cardinalMax: bigint;
12
+ export declare const ordinalMax: bigint;
13
+ export declare const currencyMax: bigint;
10
14
  export type CardinalOptions = {
11
15
  /**
12
16
  * - Remove spaces for compound form
13
17
  */
14
- dropSpaces?: boolean | undefined;
18
+ dropSpaces?: boolean;
15
19
  };
20
+ /**
21
+ * @typedef {object} CardinalOptions
22
+ * @property {boolean} [dropSpaces] - Remove spaces for compound form
23
+ */
24
+ /** @type {Required<CardinalOptions>} */
25
+ export declare const cardinalDefaults: Required<CardinalOptions>;
16
26
  /**
17
27
  * Converts a numeric value to Turkish words.
18
28
  * @param {number | string | bigint} value - The numeric value to convert
@@ -25,7 +35,7 @@ export type CardinalOptions = {
25
35
  * toCardinal(21, { dropSpaces: true }) // 'yirmibir'
26
36
  * toCardinal(1000) // 'bin'
27
37
  */
28
- export function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
38
+ declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
29
39
  /**
30
40
  * Converts a numeric value to Turkish ordinal words.
31
41
  * @param {number | string | bigint} value - The numeric value to convert (positive integer)
@@ -37,7 +47,7 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
37
47
  * toOrdinal(2) // 'ikinci'
38
48
  * toOrdinal(21) // 'yirmibirinci'
39
49
  */
40
- export function toOrdinal(value: number | string | bigint): string;
50
+ declare function toOrdinal(value: number | string | bigint): string;
41
51
  /**
42
52
  * Converts a numeric value to Turkish currency words (Turkish Lira).
43
53
  *
@@ -51,4 +61,5 @@ export function toOrdinal(value: number | string | bigint): string;
51
61
  * toCurrency(1.50) // 'bir lira elli kuruş'
52
62
  * toCurrency(-5) // 'eksi beş lira'
53
63
  */
54
- export function toCurrency(value: number | string | bigint): string;
64
+ declare function toCurrency(value: number | string | bigint): string;
65
+ export { toCardinal, toOrdinal, toCurrency };
package/src/uk-UA.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
- * @typedef {object} CardinalOptions
6
- * @property {('masculine'|'feminine')} [gender] - Grammatical gender
2
+ * Ukrainian (Ukraine) language converter
3
+ *
4
+ * CLDR: uk-UA | Ukrainian as used in Ukraine
5
+ *
6
+ * Key features:
7
+ * - Three-form pluralization (one/few/many)
8
+ * - Gender: thousands are feminine, millions+ are masculine
9
+ * - Irregular hundreds
10
+ * - Long scale naming
7
11
  */
8
- /** @type {Required<CardinalOptions>} */
9
- export const cardinalDefaults: Required<CardinalOptions>;
10
- /** @type {{ gender: ReadonlyArray<Required<CardinalOptions>['gender']> }} */
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
  * - Grammatical gender
17
18
  */
18
- gender?: "feminine" | "masculine" | undefined;
19
+ gender?: ('masculine' | 'feminine');
20
+ };
21
+ /**
22
+ * @typedef {object} CardinalOptions
23
+ * @property {('masculine'|'feminine')} [gender] - Grammatical gender
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 Ukrainian words.
@@ -23,7 +34,7 @@ export type CardinalOptions = {
23
34
  * @param {CardinalOptions} [options] - Optional configuration
24
35
  * @returns {string} The number in Ukrainian words
25
36
  */
26
- export function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
37
+ declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string;
27
38
  /**
28
39
  * Converts a numeric value to Ukrainian ordinal words (masculine nominative).
29
40
  * @param {number | string | bigint} value - The numeric value to convert (must be a positive integer)
@@ -37,7 +48,7 @@ export function toCardinal(value: number | string | bigint, options?: CardinalOp
37
48
  * toOrdinal(100) // 'сотий'
38
49
  * toOrdinal(1000) // 'тисячний'
39
50
  */
40
- export function toOrdinal(value: number | string | bigint): string;
51
+ declare function toOrdinal(value: number | string | bigint): string;
41
52
  /**
42
53
  * Converts a numeric value to Ukrainian currency words (Hryvnia).
43
54
  * @param {number | string | bigint} value - The currency amount to convert
@@ -50,4 +61,5 @@ export function toOrdinal(value: number | string | bigint): string;
50
61
  * toCurrency(1.50) // 'одна гривня п\'ятдесят копiйок'
51
62
  * toCurrency(-5) // 'мiнус п\'ять гривень'
52
63
  */
53
- export function toCurrency(value: number | string | bigint): string;
64
+ declare function toCurrency(value: number | string | bigint): string;
65
+ export { toCardinal, toOrdinal, toCurrency };