# usd-formatter

> Lightweight number to currency formatter.

Latest version **1.0.1** (published 2018-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install usd-formatter
pnpm add usd-formatter
yarn add usd-formatter
bun add usd-formatter
```

## 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 | 2018-02-12 |
| First published | 2017-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 247.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kennedy Rose |
| Maintainers | ken85rose |
| Keywords | usd, dollar, format, currency, money |

## Links

- npm: https://www.npmjs.com/package/usd-formatter
- Repository: https://github.com/escaladesports/usd-formatter
- Homepage: https://github.com/escaladesports/usd-formatter#readme
- Issues: https://github.com/escaladesports/usd-formatter/issues
- npm.io page: https://npm.io/package/usd-formatter

## Dependencies (1)

- [usd-please](https://npm.io/package/usd-please.md) ^1.0.5

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

- 1.0.1 (latest) — 2018-02-12
- 1.0.0 — 2018-02-12
- 0.1.3 — 2017-08-14
- 0.1.2 — 2017-03-21
- 0.1.1 — 2017-01-13

## README

# USD Formatter

Lightweight number to currency formatter. Accepts any kind of string or number and formats it to a USD string.

## Installation

```
$ npm i -S usd-formatter
```

## Usage

```
const formatter = require('usd-formatter')

let currency = formatter(12345678.9)
console.log(currency)

// Logs "$12,345,678.90"
```

## Options

The following options can be passed for the second argument.

```
formatter(12345678.9, {
	prepend: '$',
})
```

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