# numberToWords

Source: https://pakdatakit.dev/api/typescript/words/functions/numbertowords/

```ts
function numberToWords(n, options?): string;
```

Defined in: [words.ts:219](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/words.ts#L219)

Converts a whole number to words using the Pakistani numbering system
(hundred, thousand, lakh, crore, arab, kharab).

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `n` | `number` | A safe integer |
| `options?` | [`NumberToWordsOptions`](https://pakdatakit.dev/api/typescript/words/interfaces/numbertowordsoptions/) | Output language |

## Returns

`string`

The number in words

## Example

```ts
numberToWords(125000); // "one lakh twenty-five thousand"
numberToWords(125000, { language: 'ur' }); // "ایک لاکھ پچیس ہزار"
```

## Throws

If `n` is not a safe integer
