# format-thousands

> Format thousands with custom separator: 1 000 000

Latest version **2.0.0** (published 2020-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install format-thousands
pnpm add format-thousands
yarn add format-thousands
bun add format-thousands
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-12-30 |
| First published | 2016-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/format-thousands) |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Vladimir Rodkin |
| Maintainers | vovanr |
| Keywords | format, separate, thousands, number |

## Links

- npm: https://www.npmjs.com/package/format-thousands
- Repository: https://github.com/VovanR/format-thousands
- Homepage: https://github.com/VovanR/format-thousands#readme
- Issues: https://github.com/VovanR/format-thousands/issues
- npm.io page: https://npm.io/package/format-thousands

## 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

- 2.0.0 (latest) — 2020-12-30
- 1.1.1 — 2017-04-09
- 1.1.0 — 2017-02-16
- 1.0.4 — 2016-04-28
- 1.0.3 — 2016-04-21
- 1.0.2 — 2016-04-08
- 1.0.1 — 2016-01-17
- 1.0.0 — 2016-01-17

## README

# format-thousands

[![Commitizen friendly][commitizen-image]][commitizen-url]
[![XO code style][codestyle-image]][codestyle-url]

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Coveralls Status][coveralls-image]][coveralls-url]
[![Dependency Status][depstat-image]][depstat-url]
[![DevDependency Status][depstat-dev-image]][depstat-dev-url]

> Format thousands with custom separator: 1 000 000

Demo: [vovanr.github.io/format-thousands][demo]

## Install

```shell
npm install --save format-thousands
```

## Usage

```js
var formatThousands = require('format-thousands');

formatThousands(1000);
//=> '1 000'

formatThousands(5000, {formatFourDigits: false});
//=> '5000'

formatThousands(1000000, '`');
//=> '1`000`000'

formatThousands(10000, {separator: "'"});
//=> "10'000"

formatThousands(-100000);
//=> "-100 000"

formatThousands(10000.0001)
//=> "10 000.0001"

formatThousands();
//=> ''
```

## License
MIT © [Vladimir Rodkin](https://github.com/VovanR)

[demo]: https://vovanr.github.io/format-thousands

[commitizen-url]: https://commitizen.github.io/cz-cli/
[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square

[codestyle-url]: https://github.com/xojs/xo
[codestyle-image]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square

[npm-url]: https://npmjs.org/package/format-thousands
[npm-image]: https://img.shields.io/npm/v/format-thousands.svg?style=flat-square

[build-url]: https://github.com/VovanR/format-thousands/actions?query=workflow%3A%22Tests%22
[build-image]: https://img.shields.io/github/workflow/status/VovanR/format-thousands/Tests?style=flat-square

[coveralls-url]: https://coveralls.io/r/VovanR/format-thousands
[coveralls-image]: https://img.shields.io/coveralls/VovanR/format-thousands.svg?style=flat-square

[depstat-url]: https://david-dm.org/VovanR/format-thousands
[depstat-image]: https://david-dm.org/VovanR/format-thousands.svg?style=flat-square

[depstat-dev-url]: https://david-dm.org/VovanR/format-thousands
[depstat-dev-image]: https://david-dm.org/VovanR/format-thousands/dev-status.svg?style=flat-square

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