# number-intl

> Tiny number formatter with Intl support, tailored CLDR data and tree-shaking ready.

Latest version **1.2.2** (published 2022-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install number-intl
pnpm add number-intl
yarn add number-intl
bun add number-intl
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2022-08-03 |
| First published | 2021-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 4.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | chuyik |
| Keywords | number, format, intl, currency, cldr, numeral, numbro |

## Links

- npm: https://www.npmjs.com/package/number-intl
- Repository: https://github.com/chuyik/number-intl
- Homepage: https://github.com/chuyik/number-intl#readme
- Issues: https://github.com/chuyik/number-intl/issues
- npm.io page: https://npm.io/package/number-intl

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2022-08-03
- 1.2.1 — 2021-05-31
- 1.2.0 — 2021-05-28
- 1.1.5 — 2021-05-24
- 1.1.4 — 2021-05-24
- 1.1.3 — 2021-05-24
- 1.1.2 — 2021-05-24
- 1.1.1 — 2021-05-24
- 1.1.0 — 2021-05-24

## README

# number-intl

Tiny number formatter with Intl support, tailored CLDR data and tree-shaking ready.

## Install

```bash
yarn add number-intl
```

## Usage

```ts
import { setLocale, format } from 'number-intl';

// import locale data on demand
import 'number-intl/locales/module/en';
import 'number-intl/locales/module/zh-Hans';
import 'number-intl/locales/module/id';

// set current locale to indonesian
setLocale('id');

// format number like to string
format(3.14); // --> 3,14
format(3.14, { style: 'currency', currency: 'CNY' }); // --> CN¥3,14
format('31415926.31415926', { useGrouping: true }); // --> 31.415.926,31415926
```

---
_Source: https://npm.io/package/number-intl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
