An simple module to convert numbers to words for South Asian numbering system.
npm i num-to-hindi-word
1 -> एक
12 -> बारह
123 -> एक सौ तेईस
1234 -> एक हज़ार दो सौ चौंतीस
12345 -> बारह हज़ार तीन सौ पैंतालीस
123456 -> एक लाख तेईस हज़ार चार सौ छप्पन
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).
In case you notice a bug, please open an issue mentioning the input that has caused an incorrect conversion.