@babel/plugin-transform-function-name

Examples

In

  1. let number = (x) => x

Out

  1. var number = function number(x) {
  2. return x;
  3. };

Installation

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

Usage

  1. {
  2. "plugins": ["@babel/plugin-transform-function-name"]
  3. }

Via CLI

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

Via Node API

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