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

Universal, Node.js #4

Open
lastmjs opened this issue Dec 15, 2017 · 2 comments
Open

Universal, Node.js #4

lastmjs opened this issue Dec 15, 2017 · 2 comments

Comments

@lastmjs
Copy link
Member

lastmjs commented Dec 15, 2017

Make this package work universally in the browser and in Node.js. In Node.js we might be able to use something like jsdom or asmdom to get this to work with the iframe...but perhaps that is not the best way to do a secure eval in Node.js itself...also, we could spawn a headless electron instance to do this...think about it

@renanlecaro
Copy link

Please do some research before asking for features, this already exists somewhere else https://www.npmjs.com/package/safe-eval

@lastmjs
Copy link
Member Author

lastmjs commented Dec 14, 2018

Thanks for pointing that out. I'm not really asking for features, this is my library :) I'm just putting my thoughts together.

So to the thought, consider a WebAssembly implementation. This could work for the browser and for node, and platform-specific apis could be provided by each host environment. This would be a ways off, as we would need a way to compile JavaScript to WebAssembly. Some prototyping could probably be done with AssemblyScript.

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

2 participants