OpenBookPrices / country-data

Country related data such as ISO codes, currencies etc
MIT License
515 stars 165 forks source link

Added Currency symbols #35

Closed CjS77 closed 9 years ago

CjS77 commented 9 years ago

Currency symbols have been added.

A symbol field has been added to the currencies objects. carrying the currency symbol for the currency (e.g. ¥, $ etc.). Some symbols are not available, in which case symbol contains the ISO 4217 code.

A few tests to verify it works were also added, inter alia

assert.equal( currencies.USD.symbol, '$');
assert.equal( currencies.JPY.symbol, '¥');
assert.equal( currencies.ZAR.symbol, 'R');
evdb commented 9 years ago

Thanks for this - will merge shortly. Question - do you know if all these symbols go in front of the amount - for example "$123" and "£123"? If some symbols need to go behind the amount (eg "123R" perhaps) then it would be great to add that to the data in some way.

evdb commented 9 years ago

I've made a small tweak to source the currency symbols direct from the currency-symbol-map package. That way there is less to keep updated :)