# parseNumber (@salmonui/core/format)

> The parseNumber function of @salmonui/core/format: Parses localized number text: '1.234,5' in de-DE is 1234.5. Accepts the locale's digits, group, decimal and minus symbols (and ASCII -, and . when it is not the group symbol), currency and percent signs, and parentheses for accounting negatives. Returns null for empty text and NaN when the text is not a number.

Canonical: https://salmonui.dev/docs/reference/core/format/parseNumber

```ts
import { parseNumber } from '@salmonui/core/format';
```

Entry index: https://salmonui.dev/docs/reference/core/format (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/core/format.md).

## Reference

Kind: function

```ts
function parseNumber(text: string, options?: ParseNumberOptions): number | null;
```

Parses localized number text: `'1.234,5'` in `de-DE` is `1234.5`. Accepts
the locale's digits, group, decimal and minus symbols (and ASCII `-`, and
`.` when it is not the group symbol), currency and percent signs, and
parentheses for accounting negatives. Returns `null` for empty text and
`NaN` when the text is not a number.
