es-safe-ie

Transforms unsafe code to safe code for <IE9

npm install es-safe-ie
2 downloads in the last week
25 downloads in the last month

es-safe-ie

AST transformations to make JS safe for IE 8 and lower.

For example from:

foo.finally();

to:

foo['finally']();

Usage

var transform = require('es-safe-ie');
transform(ast);

or on the command line:

$ cat script.js
foo.finally();
$ esparse script.js | es-safe-ie | uglify --spidermonkey
foo["finally"]();
npm loves you