https://github.com/daliborgogic/dlbr
Format currency with JavaScript Intl API
https://github.com/daliborgogic/dlbr
currency format nodejs string
Last synced: 18 days ago
JSON representation
Format currency with JavaScript Intl API
- Host: GitHub
- URL: https://github.com/daliborgogic/dlbr
- Owner: daliborgogic
- License: mit
- Created: 2017-05-26T09:17:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-26T18:19:04.000Z (almost 6 years ago)
- Last Synced: 2025-04-08T14:18:10.395Z (3 months ago)
- Topics: currency, format, nodejs, string
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Format currency
> To use JavaScript Intl API, Node.js needs to run with ```--icu-data-dir=node_modules/full-icu``` option that provides us to have Intl API in our Node environment
## Build Setup
``` bash
# install dependencies
$ npm i# development
$ npm run dev# test
$ npm t
```## Example
```bash
# USD dollar
$ formatCurrency('en-US', 99.99)
> $99.99
# RSD dinar
$ formatCurrency('sr-RS', 99.99)
> 99.99 RSD
```