mask-price
v1.0.1
Published
Mask cents in formatted price.
Downloads
18
Readme
mask-price
Mask a given value as a price.
Install
npm i mask-price -S
Usage
import maskPrice from 'mask-price';
const mask = maskPrice({
locale: 'pt-BR', // (default is en-US) - format currency based on locale
cents: false // (default is true) - true/false to return cents
});
console.log(mask(439)); // '4,39'
Kickstarted by npm-boom