format-currency-to-br
v1.0.0
Published
A simple function to transform a valid float number like "2322.23" to the a masked string like the brazilian currency "R$ 2.322,23".
Downloads
118
Maintainers
Readme
Format Float to Brazilian Currency
This is a plugin to transform a number like this:
123123.12To a masked string like this:
R$ 1.231.23,12Install
With npm:
npm install --save format-currency-to-brWith bower:
bower install --save format-currency-to-brOr you can just download a ZIP.
Setup
Node or Browserify
var formatCurrencyToBr = require('format-currency.to-br');Browser (Global)
<script src="format-currency.to-br.js"></script>Usage
var price = 2839039.38;
console.log(formatCurrencytoBr(price)); // Will return: 'R$ 2.839.039,38'License
MIT
