Skip to content

Avoid eval in cloneRegex#182

Open
Deide wants to merge 2 commits intodtao:masterfrom
Deide:master
Open

Avoid eval in cloneRegex#182
Deide wants to merge 2 commits intodtao:masterfrom
Deide:master

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