n2words 1.18.0 → 1.19.1
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/dist/n2words.js +1 -1
- package/dist/n2words.js.map +1 -1
- package/lib/classes/AbstractLanguage.d.ts +4 -4
- package/lib/classes/AbstractLanguage.js +18 -20
- package/lib/classes/BaseLanguage.d.ts +11 -7
- package/lib/classes/BaseLanguage.js +13 -6
- package/lib/i18n/ar.d.ts +2 -2
- package/lib/i18n/ar.js +1 -1
- package/lib/i18n/az.d.ts +2 -2
- package/lib/i18n/az.js +1 -1
- package/lib/i18n/cz.d.ts +2 -2
- package/lib/i18n/cz.js +1 -1
- package/lib/i18n/de.d.ts +2 -2
- package/lib/i18n/de.js +1 -1
- package/lib/i18n/dk.d.ts +2 -2
- package/lib/i18n/dk.js +1 -1
- package/lib/i18n/en.d.ts +2 -2
- package/lib/i18n/en.js +1 -1
- package/lib/i18n/es.d.ts +2 -2
- package/lib/i18n/es.js +1 -1
- package/lib/i18n/fa.d.ts +2 -2
- package/lib/i18n/fa.js +1 -1
- package/lib/i18n/fr-BE.d.ts +2 -2
- package/lib/i18n/fr-BE.js +1 -1
- package/lib/i18n/fr.d.ts +2 -2
- package/lib/i18n/fr.js +1 -1
- package/lib/i18n/he.d.ts +2 -2
- package/lib/i18n/he.js +1 -1
- package/lib/i18n/hr.d.ts +2 -2
- package/lib/i18n/hr.js +1 -1
- package/lib/i18n/hu.d.ts +2 -2
- package/lib/i18n/hu.js +1 -1
- package/lib/i18n/id.d.ts +2 -2
- package/lib/i18n/id.js +1 -1
- package/lib/i18n/it.d.ts +2 -2
- package/lib/i18n/it.js +1 -1
- package/lib/i18n/ko.d.ts +2 -2
- package/lib/i18n/ko.js +1 -1
- package/lib/i18n/lt.d.ts +2 -2
- package/lib/i18n/lt.js +1 -1
- package/lib/i18n/lv.d.ts +2 -2
- package/lib/i18n/lv.js +1 -1
- package/lib/i18n/nl.d.ts +2 -2
- package/lib/i18n/nl.js +1 -1
- package/lib/i18n/no.d.ts +2 -2
- package/lib/i18n/no.js +1 -1
- package/lib/i18n/pl.d.ts +2 -2
- package/lib/i18n/pl.js +1 -1
- package/lib/i18n/pt.d.ts +2 -2
- package/lib/i18n/pt.js +1 -1
- package/lib/i18n/ru.d.ts +2 -2
- package/lib/i18n/ru.js +1 -1
- package/lib/i18n/sr.d.ts +2 -2
- package/lib/i18n/sr.js +1 -1
- package/lib/i18n/tr.d.ts +2 -2
- package/lib/i18n/tr.js +1 -1
- package/lib/i18n/uk.d.ts +2 -2
- package/lib/i18n/uk.js +1 -1
- package/lib/i18n/vi.d.ts +2 -2
- package/lib/i18n/vi.js +1 -1
- package/lib/i18n/zh.d.ts +2 -2
- package/lib/i18n/zh.js +1 -1
- package/lib/n2words.d.ts +2 -2
- package/lib/n2words.js +3 -3
- package/package.json +14 -14
|
@@ -37,17 +37,17 @@ export default class _default {
|
|
|
37
37
|
*/
|
|
38
38
|
get wholeNumber(): number;
|
|
39
39
|
/**
|
|
40
|
-
* Convert decimal number to a string array of cardinal numbers.
|
|
40
|
+
* Convert ONLY decimal portion of number (processing leading zeros) to a string array of cardinal numbers.
|
|
41
41
|
* @param {string} decimal Decimal string to convert.
|
|
42
42
|
* @returns {string} Value in written format.
|
|
43
43
|
*/
|
|
44
44
|
decimalToCardinal(decimal: string): string;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @param {number|string} value Number to be convert.
|
|
46
|
+
* Convert a number to cardinal form.
|
|
47
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
48
48
|
* @throws {Error} Value must be a valid number.
|
|
49
49
|
* @returns {string} Value in written format.
|
|
50
50
|
*/
|
|
51
|
-
floatToCardinal(value: number | string): string;
|
|
51
|
+
floatToCardinal(value: number | string | bigint): string;
|
|
52
52
|
#private;
|
|
53
53
|
}
|
|
@@ -20,8 +20,8 @@ export default class {
|
|
|
20
20
|
// Merge supplied options with defaults
|
|
21
21
|
options = Object.assign({
|
|
22
22
|
negativeWord: '',
|
|
23
|
-
separatorWord:
|
|
24
|
-
zero:
|
|
23
|
+
separatorWord: '',
|
|
24
|
+
zero: '',
|
|
25
25
|
spaceSeparator: ' '
|
|
26
26
|
}, options);
|
|
27
27
|
|
|
@@ -68,42 +68,40 @@ export default class {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* Convert decimal number to a string array of cardinal numbers.
|
|
71
|
+
* Convert ONLY decimal portion of number (processing leading zeros) to a string array of cardinal numbers.
|
|
72
72
|
* @param {string} decimal Decimal string to convert.
|
|
73
73
|
* @returns {string} Value in written format.
|
|
74
74
|
*/
|
|
75
75
|
decimalToCardinal(decimal) {
|
|
76
76
|
const words = [];
|
|
77
|
-
let allZero = true;
|
|
78
77
|
|
|
79
|
-
// Split decimal
|
|
78
|
+
// Split decimal string into an array of characters
|
|
80
79
|
const chars = decimal.split('');
|
|
81
80
|
|
|
82
|
-
// Loop through
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
});
|
|
81
|
+
// Loop through characters adding leading zeros to words array
|
|
82
|
+
let i = 0;
|
|
83
|
+
while (i < chars.length && chars[i] === '0') {
|
|
84
|
+
words.push(this.zero);
|
|
85
|
+
i++;
|
|
86
|
+
}
|
|
90
87
|
|
|
91
|
-
//
|
|
92
|
-
if (
|
|
88
|
+
// Prevent further processing if entire string was zeros
|
|
89
|
+
if (i === chars.length) {
|
|
93
90
|
return words;
|
|
94
91
|
}
|
|
95
92
|
|
|
93
|
+
// Convert and add remaining then return words array
|
|
96
94
|
return words.concat(this.toCardinal(BigInt(decimal)));
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
/**
|
|
100
|
-
*
|
|
101
|
-
* @param {number|string} value Number to be convert.
|
|
98
|
+
* Convert a number to cardinal form.
|
|
99
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
102
100
|
* @throws {Error} Value must be a valid number.
|
|
103
101
|
* @returns {string} Value in written format.
|
|
104
102
|
*/
|
|
105
103
|
floatToCardinal(value) {
|
|
106
|
-
// Validate user input value
|
|
104
|
+
// Validate user input value and convert to string (excluding BigInt)
|
|
107
105
|
if (typeof value == 'number') {
|
|
108
106
|
if (Number.isNaN(value)) {
|
|
109
107
|
throw new Error('NaN is not an accepted number.');
|
|
@@ -111,7 +109,7 @@ export default class {
|
|
|
111
109
|
value = value.toString();
|
|
112
110
|
} else if (typeof value == 'string') {
|
|
113
111
|
value = value.trim();
|
|
114
|
-
if (value.length
|
|
112
|
+
if (value.length === 0 || Number.isNaN(Number(value))) {
|
|
115
113
|
throw new Error('"' + value + '" is not a valid number.');
|
|
116
114
|
}
|
|
117
115
|
} else if (typeof value != 'bigint') {
|
|
@@ -127,7 +125,7 @@ export default class {
|
|
|
127
125
|
words.push(this.negativeWord);
|
|
128
126
|
}
|
|
129
127
|
|
|
130
|
-
// Split value decimal (if any)
|
|
128
|
+
// Split value decimal (if any) then convert to BigInt
|
|
131
129
|
if (typeof value == 'bigint') {
|
|
132
130
|
wholeNumber = value;
|
|
133
131
|
} else {
|
|
@@ -20,7 +20,7 @@ export default class _default extends AbstractLanguage {
|
|
|
20
20
|
spaceSeparator?: string;
|
|
21
21
|
}, cards: any[]);
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Set array of number matching "cards" from highest-to-lowest.
|
|
24
24
|
* First element in card array is the number to match while the second is the word to use.
|
|
25
25
|
* @example
|
|
26
26
|
* [
|
|
@@ -29,30 +29,34 @@ export default class _default extends AbstractLanguage {
|
|
|
29
29
|
* ...
|
|
30
30
|
* [1, 'one'],
|
|
31
31
|
* ]
|
|
32
|
+
*/
|
|
33
|
+
set cards(value: any[]);
|
|
34
|
+
/**
|
|
35
|
+
* Get array of number matching "cards" from highest-to-lowest.
|
|
32
36
|
* @returns {Array} Array of number matching "cards" from highest-to-lowest.
|
|
33
37
|
*/
|
|
34
38
|
get cards(): any[];
|
|
35
39
|
/**
|
|
36
40
|
* Get word for number if it matches a language card.
|
|
37
|
-
* @param {number} number Card number value.
|
|
41
|
+
* @param {number|bigint} number Card number value.
|
|
38
42
|
* @returns {string|undefined} Return card word or undefined if no card.
|
|
39
43
|
*/
|
|
40
|
-
getCardWord(number: number): string | undefined;
|
|
44
|
+
getCardWord(number: number | bigint): string | undefined;
|
|
41
45
|
/**
|
|
42
46
|
* Get array of card matches.
|
|
43
|
-
* @param {number} value The number value to convert to cardinal form.
|
|
47
|
+
* @param {number|bigint} value The number value to convert to cardinal form.
|
|
44
48
|
* @returns {object} Word sets (and pairs) from value.
|
|
45
49
|
* @todo Simplify return object.
|
|
46
50
|
*/
|
|
47
|
-
toCardMatches(value: number): object;
|
|
51
|
+
toCardMatches(value: number | bigint): object;
|
|
48
52
|
clean(words: any): any;
|
|
49
53
|
postClean(out0: any): any;
|
|
50
54
|
/**
|
|
51
55
|
* Convert a whole number to written format.
|
|
52
|
-
* @param {number} value The number value to convert to cardinal form.
|
|
56
|
+
* @param {number|bigint} value The number value to convert to cardinal form.
|
|
53
57
|
* @returns {string} Value in written format.
|
|
54
58
|
*/
|
|
55
|
-
toCardinal(value: number): string;
|
|
59
|
+
toCardinal(value: number | bigint): string;
|
|
56
60
|
#private;
|
|
57
61
|
}
|
|
58
62
|
import AbstractLanguage from './AbstractLanguage.js';
|
|
@@ -25,6 +25,14 @@ export default class extends AbstractLanguage {
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Get array of number matching "cards" from highest-to-lowest.
|
|
28
|
+
* @returns {Array} Array of number matching "cards" from highest-to-lowest.
|
|
29
|
+
*/
|
|
30
|
+
get cards() {
|
|
31
|
+
return this.#cards;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Set array of number matching "cards" from highest-to-lowest.
|
|
28
36
|
* First element in card array is the number to match while the second is the word to use.
|
|
29
37
|
* @example
|
|
30
38
|
* [
|
|
@@ -33,15 +41,14 @@ export default class extends AbstractLanguage {
|
|
|
33
41
|
* ...
|
|
34
42
|
* [1, 'one'],
|
|
35
43
|
* ]
|
|
36
|
-
* @returns {Array} Array of number matching "cards" from highest-to-lowest.
|
|
37
44
|
*/
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
set cards(value) {
|
|
46
|
+
this.#cards = value;
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
/**
|
|
43
50
|
* Get word for number if it matches a language card.
|
|
44
|
-
* @param {number} number Card number value.
|
|
51
|
+
* @param {number|bigint} number Card number value.
|
|
45
52
|
* @returns {string|undefined} Return card word or undefined if no card.
|
|
46
53
|
*/
|
|
47
54
|
getCardWord(number) {
|
|
@@ -54,7 +61,7 @@ export default class extends AbstractLanguage {
|
|
|
54
61
|
|
|
55
62
|
/**
|
|
56
63
|
* Get array of card matches.
|
|
57
|
-
* @param {number} value The number value to convert to cardinal form.
|
|
64
|
+
* @param {number|bigint} value The number value to convert to cardinal form.
|
|
58
65
|
* @returns {object} Word sets (and pairs) from value.
|
|
59
66
|
* @todo Simplify return object.
|
|
60
67
|
*/
|
|
@@ -153,7 +160,7 @@ export default class extends AbstractLanguage {
|
|
|
153
160
|
|
|
154
161
|
/**
|
|
155
162
|
* Convert a whole number to written format.
|
|
156
|
-
* @param {number} value The number value to convert to cardinal form.
|
|
163
|
+
* @param {number|bigint} value The number value to convert to cardinal form.
|
|
157
164
|
* @returns {string} Value in written format.
|
|
158
165
|
*/
|
|
159
166
|
toCardinal(value) {
|
package/lib/i18n/ar.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class Arabic extends AbstractLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
number: any;
|
package/lib/i18n/ar.js
CHANGED
|
@@ -205,7 +205,7 @@ export class Arabic extends AbstractLanguage {
|
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* Converts a value to cardinal (written) form.
|
|
208
|
-
* @param {number|string} value Number to be convert.
|
|
208
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
209
209
|
* @param {object} [options] Options for class.
|
|
210
210
|
* @throws {Error} Value cannot be invalid.
|
|
211
211
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/az.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsAZ extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
merge(lPair: any, rPair: any): {
|
package/lib/i18n/az.js
CHANGED
|
@@ -56,7 +56,7 @@ export class N2WordsAZ extends BaseLanguage {
|
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* Converts a value to cardinal (written) form.
|
|
59
|
-
* @param {number|string} value Number to be convert.
|
|
59
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
60
60
|
* @param {object} [options] Options for class.
|
|
61
61
|
* @throws {Error} Value cannot be invalid.
|
|
62
62
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/cz.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsCZ extends N2WordsRU {
|
|
10
10
|
ones: {
|
|
11
11
|
1: string;
|
package/lib/i18n/cz.js
CHANGED
|
@@ -126,7 +126,7 @@ export class N2WordsCZ extends N2WordsRU {
|
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Converts a value to cardinal (written) form.
|
|
129
|
-
* @param {number|string} value Number to be convert.
|
|
129
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
130
130
|
* @param {object} [options] Options for class.
|
|
131
131
|
* @throws {Error} Value cannot be invalid.
|
|
132
132
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/de.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsDE extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
merge(curr: any, next: any): {
|
package/lib/i18n/de.js
CHANGED
|
@@ -97,7 +97,7 @@ export class N2WordsDE extends BaseLanguage {
|
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Converts a value to cardinal (written) form.
|
|
100
|
-
* @param {number|string} value Number to be convert.
|
|
100
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
101
101
|
* @param {object} [options] Options for class.
|
|
102
102
|
* @throws {Error} Value cannot be invalid.
|
|
103
103
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/dk.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsDK extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
ordFlag: any;
|
package/lib/i18n/dk.js
CHANGED
|
@@ -100,7 +100,7 @@ export class N2WordsDK extends BaseLanguage {
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Converts a value to cardinal (written) form.
|
|
103
|
-
* @param {number|string} value Number to be convert.
|
|
103
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
104
104
|
* @param {object} [options] Options for class.
|
|
105
105
|
* @throws {Error} Value cannot be invalid.
|
|
106
106
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/en.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
/**
|
|
10
10
|
* This class is for converting numbers to english words.
|
|
11
11
|
*/
|
package/lib/i18n/en.js
CHANGED
|
@@ -76,7 +76,7 @@ export class English extends BaseLanguage {
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Converts a value to cardinal (written) form.
|
|
79
|
-
* @param {number|string} value Number to be convert.
|
|
79
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
80
80
|
* @param {object} [options] Options for class.
|
|
81
81
|
* @throws {Error} Value cannot be invalid.
|
|
82
82
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/es.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsES extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
genderStem: any;
|
package/lib/i18n/es.js
CHANGED
|
@@ -100,7 +100,7 @@ export class N2WordsES extends BaseLanguage {
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Converts a value to cardinal (written) form.
|
|
103
|
-
* @param {number|string} value Number to be convert.
|
|
103
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
104
104
|
* @param {object} [options] Options for class.
|
|
105
105
|
* @throws {Error} Value cannot be invalid.
|
|
106
106
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/fa.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsFA extends AbstractLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
namedNumbers: {
|
package/lib/i18n/fa.js
CHANGED
|
@@ -96,7 +96,7 @@ export class N2WordsFA extends AbstractLanguage {
|
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Converts a value to cardinal (written) form.
|
|
99
|
-
* @param {number|string} value Number to be convert.
|
|
99
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
100
100
|
* @param {object} [options] Options for class.
|
|
101
101
|
* @throws {Error} Value cannot be invalid.
|
|
102
102
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/fr-BE.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsFRBE extends N2WordsFR {
|
|
10
10
|
}
|
|
11
11
|
import { N2WordsFR } from './fr.js';
|
package/lib/i18n/fr-BE.js
CHANGED
|
@@ -10,7 +10,7 @@ export class N2WordsFRBE extends N2WordsFR {
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Converts a value to cardinal (written) form.
|
|
13
|
-
* @param {number|string} value Number to be convert.
|
|
13
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
14
14
|
* @param {object} [options] Options for class.
|
|
15
15
|
* @throws {Error} Value cannot be invalid.
|
|
16
16
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/fr.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsFR extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
merge(curr: any, next: any): {
|
package/lib/i18n/fr.js
CHANGED
|
@@ -87,7 +87,7 @@ export class N2WordsFR extends BaseLanguage {
|
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Converts a value to cardinal (written) form.
|
|
90
|
-
* @param {number|string} value Number to be convert.
|
|
90
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
91
91
|
* @param {object} [options] Options for class.
|
|
92
92
|
* @throws {Error} Value cannot be invalid.
|
|
93
93
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/he.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsHE extends N2WordsRU {
|
|
10
10
|
and: any;
|
|
11
11
|
ones: {
|
package/lib/i18n/he.js
CHANGED
|
@@ -125,7 +125,7 @@ export class N2WordsHE extends N2WordsRU {
|
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* Converts a value to cardinal (written) form.
|
|
128
|
-
* @param {number|string} value Number to be convert.
|
|
128
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
129
129
|
* @param {object} [options] Options for class.
|
|
130
130
|
* @throws {Error} Value cannot be invalid.
|
|
131
131
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/hr.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsHR extends N2WordsRU {
|
|
10
10
|
ones: {
|
|
11
11
|
1: string[];
|
package/lib/i18n/hr.js
CHANGED
|
@@ -120,7 +120,7 @@ export class N2WordsHR extends N2WordsRU {
|
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* Converts a value to cardinal (written) form.
|
|
123
|
-
* @param {number|string} value Number to be convert.
|
|
123
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
124
124
|
* @param {object} [options] Options for class.
|
|
125
125
|
* @throws {Error} Value cannot be invalid.
|
|
126
126
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/hu.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsHU extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
tensToCardinal(number: any): string;
|
package/lib/i18n/hu.js
CHANGED
|
@@ -125,7 +125,7 @@ export class N2WordsHU extends BaseLanguage {
|
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* Converts a value to cardinal (written) form.
|
|
128
|
-
* @param {number|string} value Number to be convert.
|
|
128
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
129
129
|
* @param {object} [options] Options for class.
|
|
130
130
|
* @throws {Error} Value cannot be invalid.
|
|
131
131
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/id.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsID extends AbstractLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
base: {
|
package/lib/i18n/id.js
CHANGED
|
@@ -156,7 +156,7 @@ export class N2WordsID extends AbstractLanguage {
|
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Converts a value to cardinal (written) form.
|
|
159
|
-
* @param {number|string} value Number to be convert.
|
|
159
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
160
160
|
* @param {object} [options] Options for class.
|
|
161
161
|
* @throws {Error} Value cannot be invalid.
|
|
162
162
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/it.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsIT extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
cardinalWords: string[];
|
package/lib/i18n/it.js
CHANGED
|
@@ -147,7 +147,7 @@ export class N2WordsIT extends BaseLanguage {
|
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* Converts a value to cardinal (written) form.
|
|
150
|
-
* @param {number|string} value Number to be convert.
|
|
150
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
151
151
|
* @param {object} [options] Options for class.
|
|
152
152
|
* @throws {Error} Value cannot be invalid.
|
|
153
153
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/ko.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsKO extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
merge(lPair: any, rPair: any): {
|
package/lib/i18n/ko.js
CHANGED
|
@@ -46,7 +46,7 @@ export class N2WordsKO extends BaseLanguage {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Converts a value to cardinal (written) form.
|
|
49
|
-
* @param {number|string} value Number to be convert.
|
|
49
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
50
50
|
* @param {object} [options] Options for class.
|
|
51
51
|
* @throws {Error} Value cannot be invalid.
|
|
52
52
|
* @returns {string} Value in cardinal (written) format.
|
package/lib/i18n/lt.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
|
-
* @param {number|string} value Number to be convert.
|
|
3
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
4
4
|
* @param {object} [options] Options for class.
|
|
5
5
|
* @throws {Error} Value cannot be invalid.
|
|
6
6
|
* @returns {string} Value in cardinal (written) format.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(value: number | string, options?: object): string;
|
|
8
|
+
export default function _default(value: number | string | bigint, options?: object): string;
|
|
9
9
|
export class N2WordsLT extends N2WordsRU {
|
|
10
10
|
ones: {
|
|
11
11
|
1: string;
|
package/lib/i18n/lt.js
CHANGED
|
@@ -129,7 +129,7 @@ export class N2WordsLT extends N2WordsRU {
|
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* Converts a value to cardinal (written) form.
|
|
132
|
-
* @param {number|string} value Number to be convert.
|
|
132
|
+
* @param {number|string|bigint} value Number to be convert.
|
|
133
133
|
* @param {object} [options] Options for class.
|
|
134
134
|
* @throws {Error} Value cannot be invalid.
|
|
135
135
|
* @returns {string} Value in cardinal (written) format.
|