scurker/currency.js — pull request #5 by iamjochem (2014-12-08 23:27:19+00:00)
Title: Bugfix for formatting

hi there,

I noticed a problem with the `format()` function ... formatting was only working correctly (with my custom settings) for values below 1000.

in Holland we use `,` for the decimal separator, and `.` for the [thousands] grouping separator - in the USA (and probably most other places) it's exactly the other way around.

I have a little wrapper module for *currency.js* that changes it's settings to reflect dutch formatting:

```js
var cjs = require('currency.js');

function dutchSettings()
{
cjs.settings.symbol	= '€';
cjs.settings.seperator	= '.';
cjs.settings.decimal	= ',';
}

dutchSettings();

cjs.dutchSettings	= dutchSettings;
module.exports	= cjs;
```

an example:

```js
var cjs = require('cjs'); // lets assume that loads the module shown above ^

console.log(cjs(1000).format());
// BEFORE: "1,000.00"
// AFTER: "1.000,00"
```

this PR changes the `format()` function to be agnostic about the `decimal` and `seperator` settings