node package manager


A shim to always run node in es5 proper "strict mode"

use strict

Node v0.10 marks a signficant milestone. NodeJS is now 100% es5 compliant. All of the core modules will run in es5 strict mode.

Unfortunately, however, you have to pass the --use_strict argument to node on the commandline in order to enforce compliance.

I created a shim so that you can shebang-run your apps (since you can't pass arguments to shebang'd commands)

npm install -g node-es5
#!/usr/bin/env node-es5

There are still a lot of modules out there that are not es5 compliant, but most of the errors are simple typos with which the code still "worked" before.

Please help the community by forking and fixing as you run into trouble!

To be abundantly clear, this won't work:

#!/usr/bin/env node --use_strict

Octals. You can't use literal octals in es5 strict (it's an ambiguous syntax and hence removed), but a lot of the core node devs wanted to continue to use them.

Other than that... no idea.