babel-preset-es2015-without-function-name

6.5.0 • Public • Published

babel-preset-es2015-without-function-name

Babel preset for all es2015 plugins without transform-es2015-function-name.

Excluded plugin causes next transformation:

var b = {
    a: function() {
        return 1;
    }
};

to:

var b = { 
    a: function a() {
        return 1;
    } 
};

In angular2 beta 7 it lead to infinity loop with crash. Excluding this plugin may help.

Install

$ npm install --save-dev babel-preset-es2015-without-function-name

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["es2015-without-function-name"]
}

Via CLI

$ babel script.js --presets es2015-without-function-name 

Via Node API

require("babel-core").transform("code", {
  presets: ["es2015-without-function-name"]
});

Readme

Keywords

none

Package Sidebar

Install

npm i babel-preset-es2015-without-function-name

Homepage

babeljs.io/

Weekly Downloads

28

Version

6.5.0

License

MIT

Last publish

Collaborators

  • dontrelax