@babel/plugin-transform-block-scoped-functions
Advanced tools
Comparing version 7.0.0-beta.49 to 7.0.0-beta.50
{ | ||
"name": "@babel/plugin-transform-block-scoped-functions", | ||
"version": "7.0.0-beta.49", | ||
"version": "7.0.0-beta.50", | ||
"description": "Babel plugin to ensure function declarations at the block level are block scoped", | ||
@@ -12,3 +12,3 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-block-scoped-functions", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.0.0-beta.49" | ||
"@babel/helper-plugin-utils": "7.0.0-beta.50" | ||
}, | ||
@@ -19,5 +19,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.49", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.49" | ||
"@babel/core": "7.0.0-beta.50", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.50" | ||
} | ||
} |
# @babel/plugin-transform-block-scoped-functions | ||
> Babel plugin to ensure function declarations at the block level are block scoped. | ||
> Babel plugin to ensure function declarations at the block level are block scoped | ||
## Examples | ||
See our website [@babel/plugin-transform-block-scoped-functions](https://new.babeljs.io/docs/en/next/babel-plugin-transform-block-scoped-functions.html) for more information. | ||
**In** | ||
## Install | ||
```javascript | ||
{ | ||
function name (n) { | ||
return n; | ||
} | ||
} | ||
Using npm: | ||
name("Steve"); | ||
``` | ||
**Out** | ||
```javascript | ||
{ | ||
let name = function (n) { | ||
return n; | ||
}; | ||
} | ||
name("Steve"); | ||
``` | ||
## Installation | ||
```sh | ||
npm install --save-dev @babel/plugin-transform-block-scoped-functions | ||
npm install --save @babel/plugin-transform-block-scoped-functions | ||
``` | ||
## Usage | ||
or using yarn: | ||
### Via `.babelrc` (Recommended) | ||
**.babelrc** | ||
```json | ||
{ | ||
"plugins": ["@babel/plugin-transform-block-scoped-functions"] | ||
} | ||
``` | ||
### Via CLI | ||
```sh | ||
babel --plugins @babel/plugin-transform-block-scoped-functions script.js | ||
yarn add --save @babel/plugin-transform-block-scoped-functions | ||
``` | ||
### Via Node API | ||
```javascript | ||
require("@babel/core").transform("code", { | ||
plugins: ["@babel/plugin-transform-block-scoped-functions"] | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2505
3
20
+ Added@babel/helper-plugin-utils@7.0.0-beta.50(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.49(transitive)