baichun fb412dddfc 堡垒之夜-工具页 | há 6 anos atrás | |
---|---|---|
.. | ||
lib | há 6 anos atrás | |
.npmignore | há 6 anos atrás | |
README.md | há 6 anos atrás | |
package.json | há 6 anos atrás |
Babel plugin to ensure function declarations at the block level are block scoped.
npm install --save-dev babel-plugin-transform-es2015-block-scoped-functions
.babelrc
(Recommended).babelrc
{
"plugins": ["transform-es2015-block-scoped-functions"]
}
babel --plugins transform-es2015-block-scoped-functions script.js
require("babel-core").transform("code", {
plugins: ["transform-es2015-block-scoped-functions"]
});