# thousands

> A micro javascript library for formatting numbers with thousands separator

Latest version **1.0.1** (published 2017-01-17) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-01-17 |
| First published | 2017-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Jason Wilson |
| Maintainers | scurker |
| Keywords | number, numbers, currency, money, utilities, format, formatting, thousands, separator |

## Links

- npm: https://www.npmjs.com/package/thousands
- Repository: https://github.com/scurker/thousands
- Homepage: https://github.com/scurker/thousands#readme
- Issues: https://github.com/scurker/thousands/issues
- npm.io page: https://npm.io/package/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

- 1.0.1 (latest) — 2017-01-17
- 1.0.0 — 2017-01-17

## README

# thousands [![Build Status](https://travis-ci.org/scurker/thousands.svg?branch=master)](https://travis-ci.org/scurker/thousands) [![npm](https://img.shields.io/npm/v/thousands.svg?style=flat)](https://www.npmjs.com/package/thousands)

A micro javascript library for formatting numbers with thousands separator.

#### Why should I use this over [Number.toLocaleString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString)?

`Number.toLocaleString()` isn't supported in some browsers (< Safari 9, < IE 11), or if you're running in an older node environment (< 0.12) i18n support is not included. In most cases you will likely want to use `Number.toLocaleString()`, but this library allows you to format numbers no matter what your environment supports.

## Install

```
$ npm install --save thousands
```

## Usage

```js
const thousands = require('thousands');

thousands(1234);      // => 1,234
thousands(123456);    // => 123,456
thousands('1234.56'); // => 1,234.56

thousands(1234, ' ');      // => 1 234
thousands(123456, ' ');    // => 123 456
thousands('1234.56', ' '); // => 1 234.56

```

## License

MIT © [Jason Wilson](http://scurker.com)

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