number-to-currency
Version:
A Simple 👌 & lightweight JavaScript number to currency formatter library.
47 lines (28 loc) • 1.35 kB
Markdown
# [NumberToCurrency.js](http://github.com/iamwavefly/number-to-currency)
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-downloads-url]
[![MIT License][license-image]][license-url]
A Simple & lightweight JavaScript number to currency formatter library.
## Installation
Using npm:
`$ npm i number-to-currency`
Using yarn:
`$ yarn add number-to-currency`
## Usage
ES5
> const **formatter** = require **("number-to-currency")**
ES6
> import **formatter** from **"number-to-currency"**
> **formatter**(2000) _-> 2,000_
## Project Status
NumberToCurrency.js is a legacy project. If you love ❤️ this library, feel free to contribute.
For more details and recommendations, please see [Project Status](http://github.com/iamwavefly/number-to-currency) in the docs.
_Thank you. 🤗_
## License
NumberToCurrency.js is freely distributable under the terms of the [MIT license][license-url].
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE
[npm-url]: https://npmjs.org/package/number-to-currency
[npm-version-image]: https://img.shields.io/npm/v/number-to-currency.svg?style=flat
[npm-downloads-image]: https://img.shields.io/npm/dm/number-to-currency.svg?style=flat
[npm-downloads-url]: https://npmcharts.com/compare/number-to-currency?minimal=true