es3-safe-recast

esprima/recast es3 safe compile step

ISC 14 个版本
安装
npm install es3-safe-recast
yarn add es3-safe-recast
pnpm add es3-safe-recast
bun add es3-safe-recast
README

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() {}
};
版本列表
3.0.0 2018-02-09
2.0.2 2015-11-27
2.0.1 2015-03-15
2.0.0 2015-03-15
1.0.0 2014-08-27
0.0.8 2014-07-10
0.0.7 2014-06-11
0.0.6 2014-06-09
0.0.5 2014-06-08
0.0.4 2014-05-27
0.0.3 2014-05-26
0.0.2 2014-05-26
0.0.1 2014-05-26
0.0.0 2014-05-26