Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 543 Bytes

README.md

File metadata and controls

23 lines (13 loc) · 543 Bytes

npm version

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.toLocaleString(value, 'pt-BR');

// currencyString = R$1.200,00
let currencyString = numberLocal.toLocaleString(value, 'pt-BR', { style: 'currency', currency: 'brl' });