Dead simple and tiny JavaScript library for realtime currency conversion and exchange rate calculation, from any currency, to any currency.
Can be easily used with the free, hourly-updating exchange rates from the Open Source Exchange Rates API project, or with static/cached/approximate/justplainwrong exchange rates.
// Simple syntax:
fx.convert(1000, {from: "GBP", to: "HKD"});
// With some chaining sugar:
fx(1.99).from("USD").to("AED");
// And settings, allowing this:
fx(1).convert();
// Oh yeah and nodeJS / AMD:
var fx = require('money');
require(["money"], function(fx) { /* ... */ });
Visit josscrowcroft.github.com/money.js for more info, examples and full documentation.
- First release