Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

money

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

money

JavaScript currency conversion library.

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65K
increased by7.12%
Maintainers
1
Weekly downloads
 
Created
Source

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.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

Keywords

FAQs

Package last updated on 28 Jan 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc