Skip to content

Conversation

ibrahimbutt
Copy link

As per the ECMAScript, the flags in RegExp should simply be strings. The fact that the code still works is because RegExp applies toString on the flags. When there is only one element in the array, it works fine, but if there is another flag, e.g ["g", "i"], it will result in "g,i", which throws a SyntaxError.

Joss Crowcroft and others added 30 commits May 31, 2012 16:25
unformat() should use the default decimal separator via @fmntf
Fix reference to settings, via @ryanwood
updated formatColumn to only accept an array as the first argument, via @jjsquillante
update index.html to request non-minified library for easier testing/exploration, via @jasonpberry
Add license info to package.json, via @reiz
bump version number in library, via @mrmoses
update regExp literal to fix failing accounting.unformat() jasmine tests, via @jjsquillante
Updated toFixed method to handle all floating point errors.

Fixes #163, #159, #145, #111, #99, #97, #84, #53
As per the ECMAScript, the flags in RegExp should simply be strings. The fact that the code still works is because RegExp applies toString on the flags. When there is only one element in the array, it works fine, but if there is another flag, e.g ["g", "i"], it will result in "g,i", which throws a SyntaxError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.