1.0.0 • Published 1 year ago
num-to-hindi-word v1.0.0
num-to-hindi-word
An simple module to convert numbers to words for South Asian numbering system.
Install
npm i num-to-hindi-wordExample
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.
1.0.0
1 year ago