1.2.2 • Published 2 years ago

number-in-words-global v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

number-in-words-global (Number in Words)

Converts Numbers from digits to words

Install

npm install number-in-words-global or yarn add number-in-words-global

Conversion Examples
123 - one hundred and twenty three
0.6 - zero point sixty
0.01 - zero point one
1001 - one thousand and one
109434034 - one hundred and nine million four hundred and thirty four thousand and thirty four

Input Parameters

number: number or string (e.g. 11022, '245')
LangCodes: EN, FR (more will be added in future)

Usage - Javascript

const ntwp = require('number-in-words-global');
const ntw = new ntwp.NumberToWords();
...
console.log(ntw.toWords(111)); // Response: one hundred and eleven

Usage - Typescript

import { NumberToWords, LangCodes } from "number-in-words-global";
const ntw = new NumberToWords();
...
console.log(ntw.toWords(223, LangCodes.FR)); // Response: deux cent vingt trois

Contributing

In case you notice a bug, please open an issue mentioning the input that has caused an incorrect conversion.

1.2.2

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago