MoneyFormating
Convert and format money value (number, string, formatted and non-formatted).
Installation
npm or yarn:
$ npm i money-formating
Description
A little package to format money values.
Examples:
Imports module:
var formating = ;
Cents and Money formatter:
//format money to cents valuevar cents = formating; console; // 34562301 //format cents to money valuevar money = formating; console; // 345623.01
Cents/Money formatter to currency:
var currency = formating; console; // 345.623,01 var currency2 = formating; console; // R$ 4.567.334,02 <- brazilian real
This is not a currency converter, just a
formatter
.
Currency Data
This lib uses the currency map from localeplanet API.