Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 549 Bytes

currencyParser.md

File metadata and controls

22 lines (13 loc) · 549 Bytes

currencyParser

Is a currency format utility.

Arguments

  • value: String | Number: A value(string or number) to be format. Positive or negative.
  • numberOfDecimalPlaces?: Number: A positive number. If is negative number value default is 2. Optional

Returns

  • string: String: A formatted string that has values ​​with separators, spacing, etc. Prefix R$

Usage

import { currencyParser } from '@platformbuilders/helpers'

currencyParser('10'); // return R$ 10,00

currencyParser(100, 0); // return R$ 100