diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:38:50 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:40:43 +0200 |
commit | 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 (patch) | |
tree | 6de9a1aebd150a23b7f8c273ec657a5d0a18fe3e /node_modules/babel-plugin-transform-es2015-parameters/README.md | |
parent | 963b7a41feb29cc4be090a2446bdfe0c1f1bcd81 (diff) |
add linting (and some initial fixes)
Diffstat (limited to 'node_modules/babel-plugin-transform-es2015-parameters/README.md')
-rw-r--r-- | node_modules/babel-plugin-transform-es2015-parameters/README.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/node_modules/babel-plugin-transform-es2015-parameters/README.md b/node_modules/babel-plugin-transform-es2015-parameters/README.md new file mode 100644 index 000000000..5c52e0c0c --- /dev/null +++ b/node_modules/babel-plugin-transform-es2015-parameters/README.md @@ -0,0 +1,47 @@ +# babel-plugin-transform-es2015-parameters + +> Compile ES2015 default and rest parameters to ES5 + +This plugin transforms ES2015 parameters to ES5, this includes: + +- Destructuring parameters +- Default parameters +- Rest parameters + +## Installation + +```sh +npm install --save-dev babel-plugin-transform-es2015-parameters +``` + +## Caveats + +Default parameters desugar into `let` declarations to retain proper semantics. If this is +not supported in your environment then you'll need the +[transform-block-scoping](http://babeljs.io/docs/plugins/transform-es2015-block-scoping) plugin. + +## Usage + +### Via `.babelrc` (Recommended) + +**.babelrc** + +```json +{ + "plugins": ["transform-es2015-parameters"] +} +``` + +### Via CLI + +```sh +babel --plugins transform-es2015-parameters script.js +``` + +### Via Node API + +```javascript +require("babel-core").transform("code", { + plugins: ["transform-es2015-parameters"] +}); +``` |