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
Mainly a tracking issue, probably (?) no action needed for now.
The RegExp.escape proposal has overcome its TC39 deadlock and is now at Stage 3!
The exact details of the implementation in the spec differ somewhat from @std/regexp/escape, but as far as I can tell, the only functional difference is that alphanumeric chars get automatically escaped at the start of the string, such that RegExp.escape('7_8_9') becomes '\\x37_8_9', which sacrifices a certain amount of readability in exchange for allowing safe interpolation immediately after the sequences \0, \<digits>, and \c.
Not sure if desirable or worthwhile to replace at this stage, but I've created a lightweight polyfill that passes the test262 tests and could work as a drop-in replacement for @std/regexp/escape. But probably better to just wait until implementations drop and then deprecate @std/regexp/escape.
The text was updated successfully, but these errors were encountered:
Mainly a tracking issue, probably (?) no action needed for now.
The
RegExp.escape
proposal has overcome its TC39 deadlock and is now at Stage 3!The exact details of the implementation in the spec differ somewhat from
@std/regexp/escape
, but as far as I can tell, the only functional difference is that alphanumeric chars get automatically escaped at the start of the string, such thatRegExp.escape('7_8_9')
becomes'\\x37_8_9'
, which sacrifices a certain amount of readability in exchange for allowing safe interpolation immediately after the sequences\0
,\<digits>
, and\c
.Not sure if desirable or worthwhile to replace at this stage, but I've created a lightweight polyfill that passes the test262 tests and could work as a drop-in replacement for
@std/regexp/escape
. But probably better to just wait until implementations drop and then deprecate@std/regexp/escape
.The text was updated successfully, but these errors were encountered: