Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-for-of

Package Overview
Dependencies
Maintainers
6
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-for-of - npm Package Compare versions

Comparing version 7.8.4 to 7.8.6

14

lib/index.js

@@ -34,3 +34,2 @@ "use strict";

right,
body,
await: isAwait

@@ -64,6 +63,13 @@ } = path.node;

const block = _core.types.toBlock(body);
let blockBody;
const body = path.get("body");
block.body.unshift(assignment);
path.replaceWith(_core.types.forStatement(_core.types.variableDeclaration("let", inits), _core.types.binaryExpression("<", _core.types.cloneNode(i), _core.types.memberExpression(_core.types.cloneNode(array), _core.types.identifier("length"))), _core.types.updateExpression("++", _core.types.cloneNode(i)), block));
if (body.isBlockStatement() && Object.keys(path.getBindingIdentifiers()).some(id => body.scope.hasOwnBinding(id))) {
blockBody = _core.types.blockStatement([assignment, body.node]);
} else {
blockBody = _core.types.toBlock(body.node);
blockBody.body.unshift(assignment);
}
path.replaceWith(_core.types.forStatement(_core.types.variableDeclaration("let", inits), _core.types.binaryExpression("<", _core.types.cloneNode(i), _core.types.memberExpression(_core.types.cloneNode(array), _core.types.identifier("length"))), _core.types.updateExpression("++", _core.types.cloneNode(i)), blockBody));
}

@@ -70,0 +76,0 @@

{
"name": "@babel/plugin-transform-for-of",
"version": "7.8.4",
"version": "7.8.6",
"description": "Compile ES2015 for...of to ES5",

@@ -21,6 +21,6 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-for-of",

"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/core": "^7.8.6",
"@babel/helper-plugin-test-runner": "^7.8.3"
},
"gitHead": "5c2e6bc07fed3d28801d93168622c99ae622653a"
"gitHead": "750d3dde3bd2d390819820fd22c05441da78751b"
}
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