Skip to content

A lightweight JavaScript library for currency symbol formatting. Zero dependencies.

License

Notifications You must be signed in to change notification settings

dulacp/currency-symbol.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

currency.js is a ridiculously tiny JavaScript library (< 1kb) for currency symbol formatting. It has zero dependencies, and works great as a NodeJS and AMD module.

Documentation

currency.symbolize(ISOCode)

> currency = require('./currency.js')
> currency.symbolize("USD")
'$'

> currency.symbolize("BGN")
'лв'

> currency.symbolize("MNT")
'₮'

Roadmap

  • Add localized symbols (to make a difference between USD and CAD for instance)
  • Maybe add an interface to playwell with accounting.js

Changelog

v1.0.0

  • Add missing symbols supported by openexchangerates (thanks to @nsue)

v0.0.1

  • First version is out !

About

A lightweight JavaScript library for currency symbol formatting. Zero dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published