# format

Source: https://pakdatakit.dev/api/typescript/format/

## Interfaces

| Interface | Description |
| :------ | :------ |
| [ParsedAmount](https://pakdatakit.dev/api/typescript/format/interfaces/parsedamount/) | The result of [parseAmount](https://pakdatakit.dev/api/typescript/format/functions/parseamount/). |

## Functions

| Function | Description |
| :------ | :------ |
| [formatPKR](https://pakdatakit.dev/api/typescript/format/functions/formatpkr/) | Formats a numeric amount as Pakistani Rupees with comma separators, rounded to whole rupees. Negative amounts are prefixed with `-`. |
| [formatLakh](https://pakdatakit.dev/api/typescript/format/functions/formatlakh/) | Formats a numeric amount using Pakistani lakh/crore conventions. |
| [parseAmount](https://pakdatakit.dev/api/typescript/format/functions/parseamount/) | Reads a rupee amount the way people type it in Pakistan, and returns it in rupees, rounded half-up to the paisa. Returns `null` for anything that is not exactly one non-negative amount; it never throws. |
| [formatAmountInput](https://pakdatakit.dev/api/typescript/format/functions/formatamountinput/) | Writes back an amount typed in any form [parseAmount](https://pakdatakit.dev/api/typescript/format/functions/parseamount/) accepts, for showing next to the field ("= Rs. 150,000"): `Rs.`, international grouping, and paisa only when there are any (`Rs. 1,234.50`). Returns `null` when `parseAmount` does; it never throws. |
