lazy.js
lazy.js copied to clipboard
Avoid eval in cloneRegex
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".
Why hasn't this been merged yet?
What's the plan with this pull request?