# format-numerals

> Formatter to convert numbers into string with different configs

Latest version **0.1.3** (published 2019-07-04) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-07-04 |
| First published | 2019-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 204.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Rohit Roy |
| Maintainers | roy23 |
| Keywords | format, numbers, numerals |

## Links

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2019-07-04
- 0.0.0-development — 2019-07-04
- 0.1.2 — 2019-06-30
- 0.1.1 — 2019-06-30
- 0.1.0 — 2019-06-30
- 0.0.2 — 2019-06-29
- 0.0.0 — 2019-06-29

## README

## Format Numerals

format-numerals is a JavaScript library to format numbers into
strings based on various available configs

[![Build Status](https://travis-ci.org/roy2393/format-numerals.svg?branch=master)](https://travis-ci.org/roy2393/format-numerals) [![Greenkeeper badge](https://badges.greenkeeper.io/roy2393/format-numerals.svg)](https://greenkeeper.io/)
![Codecov branch](https://img.shields.io/codecov/c/github/roy2393/format-numerals/master.svg)
![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/roy2393/format-numerals.svg)
![GitHub](https://img.shields.io/github/license/roy2393/format-numerals.svg)

## Install

```bash
$ npm install format-numerals
```

## Usage

### Common JS Module

```js
const { formatNumerals }  = require('format-numerals')

// By default comma separator will be placed after every 3rd digit from
// left of decimal point
formatNumerals(100000.53)
// => "100,000.53"

// comma: 1, will follow Indian number system and will place comma separator
// after in 3-2-2... pattern
formatNumerals(100000, {comma: 1}
// => "1,00,000"

// curr: 'INR' will add currency symbol before the number string
formatNumerals(1000000, { curr: 'INR', comma: 1 })
// => "₹10,00,000"

formatNumerals(1000000, { curr: 'USD' })
// => "$1,000,000"
```

### UMD

```js
<script src="https://unpkg.com/format-numerals@0.1.2/dist/index.umd.js" />

<script>
  // FN will be added to global scope
  console.log(FN.formatNumerals(1000000))
  //// => "1,000,000"
</script>
```

## License

MIT

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