Number-to-Word Converter
Converts a number to its word equivalent.
Installation
npm i @i.shubham.kr/number-to-word
Usage
const numberToWord = require('@i.shubham.kr/number-to-word')
console.log(numberToWord(1234567890, 'USD'))
// Output: One Billion Two Hundred Thirty Four Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety
Options
Option | Type | Default | Description |
---|---|---|---|
lang | string | 'USD' | Language of the output. Currently supports 'United States'. |
lang | string | 'INR' | Language of the output. Currently supports 'Indian'. |
lang | string | 'CN' | Language of the output. Currently supports 'Chinees'. |
lang | string | '' | Invalid language will return the number as it is. |
GitHub
Shubham Kumar