Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-block-scoped-functions

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-block-scoped-functions - npm Package Compare versions

Comparing version 7.0.0-beta.49 to 7.0.0-beta.50

8

package.json
{
"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"]
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc