4 ms·
Very clear example, thank you. I would like to see an option to whitelist syntax/types/keywords in Typescript. Allowing only const, dicts, arrays, assignments
by mejutoco 5y ago
Very clear example, thank you.
I would like to see an option to whitelist syntax/types/keywords in Typescript. Allowing only const, dicts, arrays, assignments (but not while). It could just abort if something other than the whitelisted appears.
It could get rid of most of this problems, and not allow network or infinite looping (or file access, and others). Of course it would not be perfect, but could be good enough.
- cormacrelf 5y agoRhai can do this, obviously not for Js but for its own very customizable Lua-competitive language. https://rhai.rs/ https://rhai.rs/