npm

@uplift-ltd/money
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @uplift-ltd/money

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

10.6 kB

Total Files

15

Last publish

Collaborators

  • mariusc23