Ship a function to quote regular expressions. #4608
benjamingr
started this conversation in
Ideas
Replies: 0 comments 7 replies
|
Bikeshedding: |
0 replies
|
Your TC39 proposal seems very reasonable to me! 👍 |
0 replies
|
TC39 has agreed to promote the proposal to stage 1 - so I'd really rather pursue it there first. |
0 replies
|
@benjamingr ... any objections to converting this into a discussion rather than keeping it open as an issue? |
0 replies
|
Proposal TC39 RegExp Escaping Proposal FYI:
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey,
One of the most "obvious" missing features in Node.js regular expressions that every other platform ships is the ability to "escape" them. That is:
There are multiple packages doing this subtly incorrectly on NPM -
lodash,escape-regexpand a few others.I've worked on a TC39 proposal to add this API to the language and it is being considered again - but if the language committee rejects the proposal - the next best place is the platform.
My current plan is:
In regards to other languages and platforms - it seems that some ship this sort of API as part of the language and some do so as part of the platform.
I am opening this issue here for discussion of the plan.
An alternative suggested by some whatwg members is trying to coordinate this sort of API with them.
All reactions