kate2753/Numeral-js — pull request #1 by cpettitt (2014-06-05 15:33:34+00:00)
Title: Fix replaceValue for currency smybol replacements

Please do not pull yet. I've tested this on node 0.10 (using grunt test) and with Nashorn (ad hoc) but it still needs to be tested on other browsers. Before I go through the matrix, I want to make sure this looks like a commit you would pull provided there are no regressions.

In terms of tests, I'm thinking of trying variations of currency format, like so:

```
numeral(1000).format("$0")
numeral(1000).format("$0.0")
numeral(1000).format("$0,0")
numeral(1000).format("$0,0.0")
```

If there are any other tests you'd like me to run, please let me know.

---

Per http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.11, '$$'
must be used to represent a literal '$' in replacement text. This is
because '$' has special meaning - it can be to substitute in parts of a
matched string, for example. This change adds a function for making this
replacement for the currency symbol only.

It appears that this problem could also impact the thousands symbol in
format number, but no language currently supported uses '$' as a symbol
for the thousands delimiter. Since there is no way to test this and I
want to keep the surface area of this change as small as possible, I've
left out escapes for the thousands delimiter.