babel/packages/babel-plugin-transform-function-name
Justin Ridgewell 2af7a33c4e Fix class inheritance in IE10 (#7969)
* Revert "Move subclass inheritance to end (#7772)"

This reverts commit f8ab9466d331871a90f458af40b14e8d831e0c29.

* Only use getPrototypeOf if setPrototypeOf is implemented

* Update fixtures

* Helpers updates

* Update fixtures

* Fall back to getPrototypeOf

* Update fixtures
2018-05-23 16:21:21 -04:00
..
2018-05-14 17:15:44 -07:00

@babel/plugin-transform-function-name

Apply ES2015 function.name semantics to all functions

Examples

In

let number = (x) => x

Out

var number = function number(x) {
  return x;
};

Installation

npm install --save-dev @babel/plugin-transform-function-name

Usage

.babelrc

{
  "plugins": ["@babel/plugin-transform-function-name"]
}

Via CLI

babel --plugins @babel/plugin-transform-function-name script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["@babel/plugin-transform-function-name"]
});