babel/packages/babel-plugin-transform-es2015-block-scoping
Moti Zilberman 7a7704fea0 Fix block scoping transform for declarations in labeled statements (#4669)
* Fix block scoping transform for declarations in labeled statements (#4122)

* DRY block-scoping
2016-10-05 21:47:21 +02:00
..
2016-09-01 11:03:06 -04:00
2015-09-15 06:12:46 +01:00

babel-plugin-transform-es2015-block-scoping

Compile ES2015 block scoping (const and let) to ES5

Installation

$ npm install babel-plugin-transform-es2015-block-scoping

Usage

.babelrc

{
  "plugins": ["transform-es2015-block-scoping"]
}

Via CLI

$ babel --plugins transform-es2015-block-scoping script.js

Via Node API

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