mask-price

1.0.1 • Public • Published

mask-price

Build Status

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

Package Sidebar

Install

npm i mask-price

Weekly Downloads

5

Version

1.0.1

License

MIT

Last publish

Collaborators

  • lucasbento