numberToWords
function numberToWords(n, options?): string;Defined in: words.ts:219
Converts a whole number to words using the Pakistani numbering system (hundred, thousand, lakh, crore, arab, kharab).
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
n |
number |
A safe integer |
options? |
NumberToWordsOptions |
Output language |
Returns
Section titled “Returns”string
The number in words
Example
Section titled “Example”numberToWords(125000); // "one lakh twenty-five thousand"numberToWords(125000, { language: 'ur' }); // "ایک لاکھ پچیس ہزار"Throws
Section titled “Throws”If n is not a safe integer