

### `formatNumber` [#formatnumber]

Formats numbers with locale-aware thousand separators and configurable decimal precision for clear, readable display.

```tsx
import { formatNumber } from "@tilt-legal/cubitt-components/utilities/formatters";

formatNumber(1234567); // "1,234,567"
formatNumber(1234.5678, { decimals: 2 }); // "1,234.57"
formatNumber(1234567, { useGrouping: false }); // "1234567"
```

| Property      | Type      | Default   | Description              |
| ------------- | --------- | --------- | ------------------------ |
| `decimals`    | `number`  | -         | Number of decimal places |
| `locale`      | `string`  | `'en-AU'` | Locale for formatting    |
| `useGrouping` | `boolean` | `true`    | Use thousand separators  |

***

### `formatCompact` [#formatcompact]

Abbreviates large numbers using compact notation (K, M, B, T) for dashboard metrics and statistics.

```tsx
import { formatCompact } from "@tilt-legal/cubitt-components/utilities/formatters";

formatCompact(1500); // "1.5K"
formatCompact(1234567); // "1.2M"
formatCompact(1234567, { decimals: 0 }); // "1M"
formatCompact(1500, { notation: "long" }); // "1.5 thousand"
```

| Property   | Type                | Default   | Description              |
| ---------- | ------------------- | --------- | ------------------------ |
| `decimals` | `number`            | `1`       | Number of decimal places |
| `locale`   | `string`            | `'en-AU'` | Locale for formatting    |
| `notation` | `'short' \| 'long'` | `'short'` | Compact notation type    |

***

### `formatOrdinal` [#formatordinal]

Converts numbers to their ordinal form with proper suffix (st, nd, rd, th) for rankings and positions.

```tsx
import { formatOrdinal } from "@tilt-legal/cubitt-components/utilities/formatters";

formatOrdinal(1); // "1st"
formatOrdinal(2); // "2nd"
formatOrdinal(3); // "3rd"
formatOrdinal(21); // "21st"
```

| Property | Type     | Default   | Description           |
| -------- | -------- | --------- | --------------------- |
| `locale` | `string` | `'en-AU'` | Locale for formatting |
