Nodejs module that blocks applications from using procss.binding('process_wrap'), process.kill and child_process methods. This protects applications from invoking these methods unintentionally, that could harm the functioning of the framework or application being developed.
This package is tested only with Node versions 8 and 10.
With npm do:
npm install restrict
var restrict = ;// ls is whitelisted;//set whitelist can be invoked, if the whitelist is dynamicrestrict;var child_process = ;try// ls is whitelisted. So you can see the output of lschild_process;// grep is not whitelisted. Exception thrownchild_process;catch e//this will throw an error//[Error: Function call spawn() is prohibited in this environment.]console;tryprocess;catch e//this will throw an error//[Error: Function call process.kill() is prohibited in this environment.]console;