Skip to content

Commit

Permalink
Fix issue with typings (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerVigario authored Jun 7, 2023
1 parent 98ac953 commit 38774da
Show file tree
Hide file tree
Showing 29 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions lib/i18n/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ export class Arabic extends AbstractLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new Arabic(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/az.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export class N2WordsAZ extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsAZ(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/cz.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ export class N2WordsCZ extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsCZ(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ export class N2WordsDE extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsDE(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/dk.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ export class N2WordsDK extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsDK(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ export class English extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new English(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ export class N2WordsES extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsES(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/fa.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ export class N2WordsFA extends AbstractLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsFA(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ export class N2WordsFR extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsFR(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/he.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ export class N2WordsHE extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsHE(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/hr.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ export class N2WordsHR extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsHR(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/hu.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ export class N2WordsHU extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsHU(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export class N2WordsID extends AbstractLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsID(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ export class N2WordsIT extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsIT(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export class N2WordsKO extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsKO(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/lt.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ export class N2WordsLT extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsLT(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/lv.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export class N2WordsLV extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsLV(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ export class N2WordsNL extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsNL(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/no.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ export class N2WordsNO extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsNO(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ export class N2WordsPL extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsPL(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ export class N2WordsPT extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsPT(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ export class N2WordsRU extends AbstractLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsRU(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/sr.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ export class N2WordsSR extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsSR(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/tr.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export class N2WordsTR extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsTR(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export class N2WordsUK extends N2WordsRU {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsUK(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/vi.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ export class N2WordsID extends AbstractLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsID(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions lib/i18n/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ export class N2WordsZH extends BaseLanguage {
/**
* Converts a value to cardinal (written) form.
* @param {number|string} value Number to be convert.
* @param {object} options Options for class.
* @param {object} [options] Options for class.
* @throws {Error} Value cannot be invalid.
* @returns {string} Value in cardinal (written) format.
*/
export default function (value, options) {
export default function (value, options = {}) {
return new N2WordsZH(options).floatToCardinal(value);
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n2words",
"version": "1.16.3",
"version": "1.16.4",
"description": "n2words converts a numerical number into a written one, supports 27 languages and has zero dependencies.",
"keywords": [
"n2words",
Expand Down Expand Up @@ -65,7 +65,7 @@
"scripts": {
"bench": "node bench.js",
"build": "webpack --config webpack.config.js --progress",
"build:types": "npx -p typescript tsc lib/n2words.js dist/n2words.js --declaration --allowJs --emitDeclarationOnly",
"build:types": "npx -p typescript tsc lib/n2words.js dist/n2words.js --target esnext --module nodenext --declaration --allowJs --emitDeclarationOnly",
"coverage": "c8 ava",
"lint": "eslint --config .eslintrc.json lib/ test/ bench.js",
"test": "ava --verbose",
Expand Down

0 comments on commit 38774da

Please sign in to comment.