GithubHelp home page GithubHelp logo

imclab / money.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openexchangerates/money.js

1.0 2.0 0.0 60 KB

money.js is a tiny (1kb) javascript currency conversion library, for web & nodeJS

Home Page: http://josscrowcroft.github.com/money.js

License: MIT License

money.js's Introduction

money.js / fx()

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");

// Basic parsing:
fx("$1.99 HKD").to("EUR");

// And simple setup, 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.

Changelog

0.1.3 - Fix typo in nodeJS module definition

0.1.2 - Strengthened up module definition similar to accounting.js

0.1.1 - Add fallback in case base rate is not in rates object (e.g. "USD": 1) to avoid errors.

0.1.0 - Unexciting version number bump. Oh yeah and it has a license now.

0.0.2

  • Adds basic parsing to fx(), so that you can pass a formatted string, like so: fx("$1.99 HKD").to("GBP")
  • Some cleanup and improved comments and docs

0.0.1 - First release

money.js's People

Stargazers

JT5D avatar

Watchers

JT5D avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.