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

Avoid eval in cloneRegex #182

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Avoid eval in cloneRegex #182

wants to merge 2 commits into from

Conversation

Deide
Copy link

@Deide Deide commented Apr 23, 2016

The main reason to replace eval is for better static analysis. Build tools such as rollup spit warnings about the use of local eval.

Not only that, but eval seems to be slower in some situations. It's also a lot faster to just return the passed in RegExp if it has the global flag already set - no need to "clone".

@Deide Deide changed the title Avoid eval in cloneRegex Avoid eval in cloneRegex Apr 23, 2016
@Announcement
Copy link

Why hasn't this been merged yet?

@eddietejeda
Copy link

What's the plan with this pull request?

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.

3 participants