Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-for-of

Package Overview
Dependencies
Maintainers
5
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.4.0 to 7.4.3

14

lib/index.js

@@ -85,3 +85,3 @@ "use strict";

const buildForOfArray = (0, _core().template)(`
for (var KEY = 0; KEY < ARR.length; KEY++) BODY;
for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;
`);

@@ -135,7 +135,3 @@ const buildForOfLoose = (0, _core().template)(`

} = path;
const uid = scope.generateUid("arr");
const nodes = [_core().types.variableDeclaration("var", [_core().types.variableDeclarator(_core().types.identifier(uid), node.right)])];
const right = _core().types.identifier(uid);
const right = scope.generateUidIdentifierBasedOnNode(node.right, "arr");
const iterationKey = scope.generateUidIdentifier("i");

@@ -145,3 +141,4 @@ let loop = buildForOfArray({

KEY: iterationKey,
ARR: right
NAME: right,
ARR: node.right
});

@@ -168,4 +165,3 @@

nodes.push(loop);
return nodes;
return [loop];
}

@@ -172,0 +168,0 @@

{
"name": "@babel/plugin-transform-for-of",
"version": "7.4.0",
"version": "7.4.3",
"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.4.0",
"@babel/core": "^7.4.3",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804"
"gitHead": "508fde4009f31883f318b9e6546459ac1b086a91"
}
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