Welcome redditors! I’m answering your questions in the comment thread.
"use restrict";
Add that to the top of your JavaScript program. Run it through the JSShaper restricter
plugin, then combine it with the restrictmode.js
prelude and run it. Then hook it up with your units tests.
Try restrict mode directly in your browser (Firefox, Chrome or Safari)!
For semantics and rationale visit restrictmode.org. It’s not set in stone so let me know what you think.
I’ll write more about JSShaper in time. It’s an extensible framework for JavaScript syntax tree shaping and we’re going to be able to do lots of nifty things with it.
Follow me on Twitter