Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 635 Bytes

README.md

File metadata and controls

45 lines (31 loc) · 635 Bytes

es3-safe-recast

Recasts all ECMAScript 3 reserved words to their safe alternatives.

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() {}
};