babel-preset-es2015-without-function-name

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-preset-es2015-without-function-name
006.5.07 years ago7 years agoMinified + gzip package size for babel-preset-es2015-without-function-name in KB

Readme

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"]
});