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

Plans to move away from dynamic functions? #18

Open
jnarowski opened this issue Nov 8, 2018 · 3 comments
Open

Plans to move away from dynamic functions? #18

jnarowski opened this issue Nov 8, 2018 · 3 comments

Comments

@jnarowski
Copy link

return pMatchFunctionCache[matcher] = new Function('el', source);

I'm not able to use this library in a serverless environment because of these dynamic functions. Any plans to refactor the code to not depend on these?

@ashi009
Copy link
Owner

ashi009 commented Nov 8, 2018

Back to the time I wrote it, this was the fastest way to match nodes on a tree. Don't know if those assumptions are changed.

This can be replaced that with a closure with matching configs embedded.

@Tahiche
Copy link

Tahiche commented Dec 27, 2018

This can be replaced that with a closure with matching configs embedded.
Can you explain how to do this?.

@jnarowski
Copy link
Author

jnarowski commented Dec 29, 2018

the new Function is now replaced and merged into master in this fork:
https://github.com/taoqf/node-html-parser

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

No branches or pull requests

3 participants