number-locale-string
v0.4.1
Published
Imprementation of Number.toLocaleString() to Node
Downloads
73
Readme
number-locale-string
Install
npm install --save number-locale-string
Using
const numberLocal = require('number-locale-string');
let value = 1200.00;
// valueString = '1.200'
let valueString = numberLocal.toLocalString(value, 'pt-BR');
// currencyString = R$1.200,00
let currencyString = numberLocal.toLocalString(value, 'pt-BR', { style: 'currency', currency: 'brl' });