es3-safe-recast [](https://travis-ci.org/stefanpenner/es3-safe-recast)
February 9, 2018 ยท View on GitHub
Recasts all ECMAScript 3 reserved words to their safe alternatives.
Optionally removes trailing commas in object and array literals (pass { trailingComma: true } as the second argument to compile).
helpers
Before
ajax('/asdf/1').catch(function(reason) {
}).finally(function() {
});
After
ajax('/asdf/1')['catch'](function(reason) {
})['finally'](function() {
});
Before
object = {
catch: function() {},
finally: function() {},
default: function() {}
};
After
object = {
'catch': function() {},
'finally': function() {},
'default': function() {}
};