currency-symbol-wrap

1.0.2 • Public • Published

currency-symbol-wrap

A module that can add currency symbol in front of string or returns currency symbol corresponding to currency code.

HOW TO INSTALL

npm install currency-symbol-wrap --save

HOW TO USE

var cur = require('currency-symbol-wrap');

cur.addCurrencySymbol('123', 'USD') //Returns $123

cur.addCurrencySymbol('1234', 'EUR') //Returns €1234

cur.getCurrencySymbol('CZK') //Returns Kč

METHODS

  • addCurrencySymbol
    Adds currency symbol in front of string
    cur.addCurrencySymbol('123', 'USD')  // $123
    cur.addCurrencySymbol('1234', 'EUR') // €1234
  • getCurrencySymbol
    Gets currency symbol for currency code
  cur.getCurrencySymbol('CZK') // Kč
  cur.getCurrencySymbol('EUR') // €

Package Sidebar

Install

npm i currency-symbol-wrap

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

7.34 kB

Total Files

4

Last publish

Collaborators

  • riteshchauhan25696