@babel/plugin-transform-function-name
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
With a configuration file (Recommended)
{
"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"]
});