n2words 1.16.3 → 1.16.4
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/i18n/ar.d.ts +2 -2
- package/lib/i18n/ar.js +2 -2
- package/lib/i18n/az.d.ts +2 -2
- package/lib/i18n/az.js +2 -2
- package/lib/i18n/cz.d.ts +2 -2
- package/lib/i18n/cz.js +2 -2
- package/lib/i18n/de.d.ts +2 -2
- package/lib/i18n/de.js +2 -2
- package/lib/i18n/dk.d.ts +2 -2
- package/lib/i18n/dk.js +2 -2
- package/lib/i18n/en.d.ts +2 -2
- package/lib/i18n/en.js +2 -2
- package/lib/i18n/es.d.ts +2 -2
- package/lib/i18n/es.js +2 -2
- package/lib/i18n/fa.d.ts +2 -2
- package/lib/i18n/fa.js +2 -2
- package/lib/i18n/fr.d.ts +2 -2
- package/lib/i18n/fr.js +2 -2
- package/lib/i18n/he.d.ts +2 -2
- package/lib/i18n/he.js +2 -2
- package/lib/i18n/hr.d.ts +2 -2
- package/lib/i18n/hr.js +2 -2
- package/lib/i18n/hu.d.ts +2 -2
- package/lib/i18n/hu.js +2 -2
- package/lib/i18n/id.d.ts +2 -2
- package/lib/i18n/id.js +2 -2
- package/lib/i18n/it.d.ts +2 -2
- package/lib/i18n/it.js +2 -2
- package/lib/i18n/ko.d.ts +2 -2
- package/lib/i18n/ko.js +2 -2
- package/lib/i18n/lt.d.ts +2 -2
- package/lib/i18n/lt.js +2 -2
- package/lib/i18n/lv.d.ts +2 -2
- package/lib/i18n/lv.js +2 -2
- package/lib/i18n/nl.d.ts +2 -2
- package/lib/i18n/nl.js +2 -2
- package/lib/i18n/no.d.ts +2 -2
- package/lib/i18n/no.js +2 -2
- package/lib/i18n/pl.d.ts +2 -2
- package/lib/i18n/pl.js +2 -2
- package/lib/i18n/pt.d.ts +2 -2
- package/lib/i18n/pt.js +2 -2
- package/lib/i18n/ru.d.ts +2 -2
- package/lib/i18n/ru.js +2 -2
- package/lib/i18n/sr.d.ts +2 -2
- package/lib/i18n/sr.js +2 -2
- package/lib/i18n/tr.d.ts +2 -2
- package/lib/i18n/tr.js +2 -2
- package/lib/i18n/uk.d.ts +2 -2
- package/lib/i18n/uk.js +2 -2
- package/lib/i18n/vi.d.ts +2 -2
- package/lib/i18n/vi.js +2 -2
- package/lib/i18n/zh.d.ts +2 -2
- package/lib/i18n/zh.js +2 -2
- package/package.json +2 -2
package/lib/i18n/ru.js
CHANGED
|
@@ -194,10 +194,10 @@ export class N2WordsRU extends AbstractLanguage {
|
|
|
194
194
|
/**
|
|
195
195
|
* Converts a value to cardinal (written) form.
|
|
196
196
|
* @param {number|string} value Number to be convert.
|
|
197
|
-
* @param {object} options Options for class.
|
|
197
|
+
* @param {object} [options] Options for class.
|
|
198
198
|
* @throws {Error} Value cannot be invalid.
|
|
199
199
|
* @returns {string} Value in cardinal (written) format.
|
|
200
200
|
*/
|
|
201
|
-
export default function (value, options) {
|
|
201
|
+
export default function (value, options = {}) {
|
|
202
202
|
return new N2WordsRU(options).floatToCardinal(value);
|
|
203
203
|
}
|
package/lib/i18n/sr.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
3
|
* @param {number|string} value Number to be convert.
|
|
4
|
-
* @param {object} options Options for class.
|
|
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
|
|
8
|
+
export default function _default(value: number | string, options?: object): string;
|
|
9
9
|
export class N2WordsSR extends N2WordsRU {
|
|
10
10
|
ones: {
|
|
11
11
|
1: string[];
|
package/lib/i18n/sr.js
CHANGED
|
@@ -119,10 +119,10 @@ export class N2WordsSR extends N2WordsRU {
|
|
|
119
119
|
/**
|
|
120
120
|
* Converts a value to cardinal (written) form.
|
|
121
121
|
* @param {number|string} value Number to be convert.
|
|
122
|
-
* @param {object} options Options for class.
|
|
122
|
+
* @param {object} [options] Options for class.
|
|
123
123
|
* @throws {Error} Value cannot be invalid.
|
|
124
124
|
* @returns {string} Value in cardinal (written) format.
|
|
125
125
|
*/
|
|
126
|
-
export default function (value, options) {
|
|
126
|
+
export default function (value, options = {}) {
|
|
127
127
|
return new N2WordsSR(options).floatToCardinal(value);
|
|
128
128
|
}
|
package/lib/i18n/tr.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
3
|
* @param {number|string} value Number to be convert.
|
|
4
|
-
* @param {object} options Options for class.
|
|
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
|
|
8
|
+
export default function _default(value: number | string, options?: object): string;
|
|
9
9
|
export class N2WordsTR extends BaseLanguage {
|
|
10
10
|
constructor(options?: {});
|
|
11
11
|
merge(lPair: any, rPair: any): {
|
package/lib/i18n/tr.js
CHANGED
|
@@ -55,10 +55,10 @@ export class N2WordsTR extends BaseLanguage {
|
|
|
55
55
|
/**
|
|
56
56
|
* Converts a value to cardinal (written) form.
|
|
57
57
|
* @param {number|string} value Number to be convert.
|
|
58
|
-
* @param {object} options Options for class.
|
|
58
|
+
* @param {object} [options] Options for class.
|
|
59
59
|
* @throws {Error} Value cannot be invalid.
|
|
60
60
|
* @returns {string} Value in cardinal (written) format.
|
|
61
61
|
*/
|
|
62
|
-
export default function (value, options) {
|
|
62
|
+
export default function (value, options = {}) {
|
|
63
63
|
return new N2WordsTR(options).floatToCardinal(value);
|
|
64
64
|
}
|
package/lib/i18n/uk.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
3
|
* @param {number|string} value Number to be convert.
|
|
4
|
-
* @param {object} options Options for class.
|
|
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
|
|
8
|
+
export default function _default(value: number | string, options?: object): string;
|
|
9
9
|
export class N2WordsUK extends N2WordsRU {
|
|
10
10
|
}
|
|
11
11
|
import { N2WordsRU } from './ru.js';
|
package/lib/i18n/uk.js
CHANGED
|
@@ -86,10 +86,10 @@ export class N2WordsUK extends N2WordsRU {
|
|
|
86
86
|
/**
|
|
87
87
|
* Converts a value to cardinal (written) form.
|
|
88
88
|
* @param {number|string} value Number to be convert.
|
|
89
|
-
* @param {object} options Options for class.
|
|
89
|
+
* @param {object} [options] Options for class.
|
|
90
90
|
* @throws {Error} Value cannot be invalid.
|
|
91
91
|
* @returns {string} Value in cardinal (written) format.
|
|
92
92
|
*/
|
|
93
|
-
export default function (value, options) {
|
|
93
|
+
export default function (value, options = {}) {
|
|
94
94
|
return new N2WordsUK(options).floatToCardinal(value);
|
|
95
95
|
}
|
package/lib/i18n/vi.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
3
|
* @param {number|string} value Number to be convert.
|
|
4
|
-
* @param {object} options Options for class.
|
|
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
|
|
8
|
+
export default function _default(value: number | string, options?: object): string;
|
|
9
9
|
export class N2WordsID extends AbstractLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
base: {
|
package/lib/i18n/vi.js
CHANGED
|
@@ -146,10 +146,10 @@ export class N2WordsID extends AbstractLanguage {
|
|
|
146
146
|
/**
|
|
147
147
|
* Converts a value to cardinal (written) form.
|
|
148
148
|
* @param {number|string} value Number to be convert.
|
|
149
|
-
* @param {object} options Options for class.
|
|
149
|
+
* @param {object} [options] Options for class.
|
|
150
150
|
* @throws {Error} Value cannot be invalid.
|
|
151
151
|
* @returns {string} Value in cardinal (written) format.
|
|
152
152
|
*/
|
|
153
|
-
export default function (value, options) {
|
|
153
|
+
export default function (value, options = {}) {
|
|
154
154
|
return new N2WordsID(options).floatToCardinal(value);
|
|
155
155
|
}
|
package/lib/i18n/zh.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converts a value to cardinal (written) form.
|
|
3
3
|
* @param {number|string} value Number to be convert.
|
|
4
|
-
* @param {object} options Options for class.
|
|
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
|
|
8
|
+
export default function _default(value: number | string, options?: object): string;
|
|
9
9
|
export class N2WordsZH extends BaseLanguage {
|
|
10
10
|
constructor(options: any);
|
|
11
11
|
merge(lPair: any, rPair: any): {
|
package/lib/i18n/zh.js
CHANGED
|
@@ -69,10 +69,10 @@ export class N2WordsZH extends BaseLanguage {
|
|
|
69
69
|
/**
|
|
70
70
|
* Converts a value to cardinal (written) form.
|
|
71
71
|
* @param {number|string} value Number to be convert.
|
|
72
|
-
* @param {object} options Options for class.
|
|
72
|
+
* @param {object} [options] Options for class.
|
|
73
73
|
* @throws {Error} Value cannot be invalid.
|
|
74
74
|
* @returns {string} Value in cardinal (written) format.
|
|
75
75
|
*/
|
|
76
|
-
export default function (value, options) {
|
|
76
|
+
export default function (value, options = {}) {
|
|
77
77
|
return new N2WordsZH(options).floatToCardinal(value);
|
|
78
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n2words",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.4",
|
|
4
4
|
"description": "n2words converts a numerical number into a written one, supports 27 languages and has zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n2words",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"scripts": {
|
|
66
66
|
"bench": "node bench.js",
|
|
67
67
|
"build": "webpack --config webpack.config.js --progress",
|
|
68
|
-
"build:types": "npx -p typescript tsc lib/n2words.js dist/n2words.js --declaration --allowJs --emitDeclarationOnly",
|
|
68
|
+
"build:types": "npx -p typescript tsc lib/n2words.js dist/n2words.js --target esnext --module nodenext --declaration --allowJs --emitDeclarationOnly",
|
|
69
69
|
"coverage": "c8 ava",
|
|
70
70
|
"lint": "eslint --config .eslintrc.json lib/ test/ bench.js",
|
|
71
71
|
"test": "ava --verbose",
|