Skip to content

stefanpenner/es3-safe-recast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

es3-safe-recast Build Status

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published