1.0.0 • Published 7 months ago

asian-num-words v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

asian-num-words

A simple module for converting numbers to words in the South Asian numbering system. E.g. One crore five lakh.

Install

npm install asian-num-words

Example

1          => // One
12         => // twelve
123        => // one hundred and twenty three
1234       => // one thousand two hundred and thirty four
12345      => // twelve thousand three hundred and forty five
123456     => // one lakh twenty three thousand four hundred and fifty six
1234567    => // twelve lakh thirty four thousand five hundred and six seven
12345678   => // one crore twenty three lakh fourty five thousand six hundred and seventy eight

Usage

const asianNumWords = require('asian-num-words');

const amountInWords = asianNumWords(12345);  // twelve thousand three hundred and forty five

Contributing

If you encounter a bug, please open an issue with the input that caused an incorrect conversion.

Keywords

digit, convert, word, number, amount