Open chaser92 opened 9 years ago
It does seem that JSON.stringify() would be nicer. Is there a reason to stick with util.inspect() here? (Asked with humility, as I'm pretty new to node.js.)
I had to use eval() because of this..
I believe the way I am using Sandbox is such that, running eval() on output.result should be safe.. but this gives me a bit of heebie jeebies.. It would be nice if I could just use JSON.parse directly.
When returning a result object from shovel.js, you're using util.inspect - however, an object passed this way will not be usable on the other side (after JSON.parse, it will be a string that can't be turned back to a JSON, unless one uses eval()). Omitting util.inspect would be enough for this to work as JSON.stringify works recursively.