Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex flags #185

Open
wants to merge 82 commits into
base: dev
Choose a base branch
from
Open

Regex flags #185

wants to merge 82 commits into from

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.