formatLakh
function formatLakh(amount): string;Defined in: format.ts:50
Formats a numeric amount using Pakistani lakh/crore conventions.
- Amounts of 1 crore or more render as
"N Crore"(e.g.10000000→"1 Crore") - Amounts of 1 lakh or more render as
"N Lakh"(e.g.2500000→"25 Lakh") - Smaller amounts fall back to formatPKR
Values are rounded to two decimals before the unit is chosen, so
9999999 renders as "1 Crore" rather than "100 Lakh".
Negative amounts are prefixed with -.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
amount |
number |
The amount in PKR |
Returns
Section titled “Returns”string
Human-readable lakh/crore string
Throws
Section titled “Throws”If amount is NaN or infinite