num-to-hindi-word

1.0.0 • Public • Published

num-to-hindi-word

An simple module to convert numbers to words for South Asian numbering system.

Install

npm i num-to-hindi-word

Example

1          ->  एक
12         ->  बारह
123        ->  एक सौ तेईस
1234       ->  एक हज़ार दो सौ चौंतीस
12345      ->  बारह हज़ार तीन सौ पैंतालीस
123456     ->  एक लाख तेईस हज़ार चार सौ छप्पन

Usage

const numWordsHindi = require('num-to-hindi-word')

const amountInWords = numWordsHindi(12345) // Example output: बारह हज़ार तीन सौ पैंतालीस

Note: This module only supports 9 digits input. A typical usecase for such convertion is in tax invoices or charts etc. For that more than 9 digits input is not very common (and also not very readable).

Contributing

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

Package Sidebar

Install

npm i num-to-hindi-word

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

5.74 kB

Total Files

4

Last publish

Collaborators

  • devendra_sharma