Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
77
Maintainers
4
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-beta.31 to 7.0.0-beta.32

20

lib/index.js

@@ -6,5 +6,5 @@ "use strict";

function _default(_ref) {
var t = _ref.types;
var _core = require("@babel/core");
function _default() {
function statementList(key, path) {

@@ -14,17 +14,19 @@ var paths = path.get(key);

for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref2;
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref2 = _iterator[_i++];
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref2 = _i.value;
_ref = _i.value;
}
var _path2 = _ref2;
var _path2 = _ref;
var func = _path2.node;
if (!_path2.isFunctionDeclaration()) continue;
var declar = t.variableDeclaration("let", [t.variableDeclarator(func.id, t.toExpression(func))]);
var declar = _core.types.variableDeclaration("let", [_core.types.variableDeclarator(func.id, _core.types.toExpression(func))]);
declar._blockHoist = 2;

@@ -43,5 +45,5 @@ func.id = null;

if (t.isFunction(parent, {
if (_core.types.isFunction(parent, {
body: node
}) || t.isExportDeclaration(parent)) {
}) || _core.types.isExportDeclaration(parent)) {
return;

@@ -48,0 +50,0 @@ }

{
"name": "@babel/plugin-transform-block-scoped-functions",
"version": "7.0.0-beta.31",
"version": "7.0.0-beta.32",
"description": "Babel plugin to ensure function declarations at the block level are block scoped",

@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-block-scoped-functions",

"peerDependencies": {
"@babel/core": "7.0.0-beta.31"
"@babel/core": "7.0.0-beta.32"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.31",
"@babel/helper-plugin-test-runner": "7.0.0-beta.31"
"@babel/core": "7.0.0-beta.32",
"@babel/helper-plugin-test-runner": "7.0.0-beta.32"
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc