You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of deepEqual for RegExp objects is good. Specifically, it's great that it doesn't compare lastIndex properties. However, the current implementation ignores the /y flag and its corresponding sticky property, which should be added to the list of comparisons.
Aside: ES6 will add support for two new RegExp flags: /y and /u. The /y flag is already supported in Firefox 3+, and has the corresponding property RegExp.prototype.sticky. The /u flag will likely show up with the property name unicode, but since that's not in writing anywhere, at the moment, it would probably be best to wait until the first implementations for /u show up before comparing unicode properties.
The text was updated successfully, but these errors were encountered:
I have a fix for this, but grunt won't run the tests because "y" is still an invalid flag and hasn't been implemented (I'm assuming in PhantomJS). Is there a way to test it? With just the change, the tests all pass, but that's because none of the RegExp tests are trying to build a regular expression with the sticky flag.
The current implementation of
deepEqual
forRegExp
objects is good. Specifically, it's great that it doesn't comparelastIndex
properties. However, the current implementation ignores the/y
flag and its correspondingsticky
property, which should be added to the list of comparisons.Aside: ES6 will add support for two new RegExp flags:
/y
and/u
. The/y
flag is already supported in Firefox 3+, and has the corresponding propertyRegExp.prototype.sticky
. The/u
flag will likely show up with the property nameunicode
, but since that's not in writing anywhere, at the moment, it would probably be best to wait until the first implementations for/u
show up before comparingunicode
properties.The text was updated successfully, but these errors were encountered: