unformat-money-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

unformat-money-js

Build Status version download per month

Zero dependency tiny JavaScript library (576 bytes) by CurrencyRate.today, providing simple way removes all formatting/cruft and returns the raw float value.

Require

const { UnFormatMoney } = require('unformat-money-js');

Example

const un = new UnFormatMoney();

console.log(un.from('$12,345.67')); // 12345.67

Options

You can added options in construct of class and in method. But method will be primary.

Example:

const un = new UnFormatMoney({ decimalPoint: ',' });

console.log(un.from('€12.345,67', { decimalPoint: ',' })); // 12345.67
Name Default Type
decimalPoint . String

Source

https://currencyrate.today/

https://fx-w.io/

Package Sidebar

Install

npm i unformat-money-js

Weekly Downloads

11

Version

1.0.4

License

BSD-2-Clause

Unpacked Size

10.8 kB

Total Files

15

Last publish

Collaborators

  • yydarwin