Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 605 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 605 Bytes

Money printer - JavaScript currency formatting

Installation

npm i money-printer --save

Basic usage

var money = require('money-printer');

money.print(1000.5, 'EUR');   // "1 000.50 €"
money.print(1000.5, 'USD');   // "$1,000.50"
money.print(1000.5, 'GBP');   // "£1,000.50"
money.print(1000.5, 'PLN');   // "1 000,50 zł"
money.print(1000.5, 'CZK');   // "1,000.50 Kč"
money.print(1000.5, 'SEK');   // "1,000.50 kr"

// use   character instead of space:
money.print(10, 'EUR', true);   // "10.00 €"

Supported currency: EUR, USD, GBP, PLN, JPY, CZK, SEK