This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const getNumbersToWord = (numbers: any) => { | |
// stores word representation of given number n | |
let inWords = ''; | |
// handles digits at ten millions and hundred | |
// millions places (if any) | |
inWords += getTranslatedNumber(Math.floor(numbers / 10000000), 'Crore '); | |
// handles digits at hundred thousands and one | |
// millions places (if any) | |
inWords += getTranslatedNumber(Math.floor(numbers / 100000) % 100, 'Lakh '); | |
// handles digits at thousands and tens thousands |