@uplift-ltd/money
v3.0.0
Published
Helpers for dealing with django money.
Downloads
2
Readme
@uplift-ltd/money
Installation
npm i --save @uplift-ltd/money
API
formatCurrency
Format an amount.
import { formatCurrency } from "@uplift-ltd/money";
formatCurrency(123.45, "USD"); // => $123.45
formatCurrency("12345.67", "USD"); // => $12,345.67
formatCurrency(null, "USD"); // => $0
parseAmount
Parse a money string into a number.
import { parseAmount } from "@uplift-ltd/money";
parseAmount("123.45 USD"); // => 123.45