babel/packages/babel-plugin-transform-es2015-block-scoped-functions
Sebastian McKenzie 03383bdf31 v6.1.4
2015-11-11 02:04:26 -08:00
..
2015-10-29 17:51:24 +00:00
2015-11-11 02:04:26 -08:00
2015-09-15 06:12:46 +01:00

babel-plugin-transform-es2015-block-scoped-functions

Babel plugin to ensure function declarations at the block level are block scoped.

Installation

$ npm install babel-plugin-transform-es2015-block-scoped-functions

Usage

.babelrc

{
  "plugins": ["transform-es2015-block-scoped-functions"]
}

Via CLI

$ babel --plugins transform-es2015-block-scoped-functions script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-es2015-block-scoped-functions"]
});