@babel/plugin-transform-for-of
Advanced tools
Comparing version 7.23.3 to 7.23.6
@@ -10,2 +10,3 @@ "use strict"; | ||
var _noHelperImplementation = require("./no-helper-implementation.js"); | ||
var _helperSkipTransparentExpressionWrappers = require("@babel/helper-skip-transparent-expression-wrappers"); | ||
function buildLoopBody(path, declar, newBody) { | ||
@@ -60,3 +61,2 @@ let block; | ||
left, | ||
right, | ||
await: isAwait | ||
@@ -67,4 +67,8 @@ } = path.node; | ||
} | ||
const right = (0, _helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes)(path.node.right); | ||
const i = scope.generateUidIdentifier("i"); | ||
let array = scope.maybeGenerateMemoised(right, true); | ||
if (!array && _core.types.isIdentifier(right) && path.get("body").scope.hasOwnBinding(right.name)) { | ||
array = scope.generateUidIdentifier("arr"); | ||
} | ||
const inits = [_core.types.variableDeclarator(i, _core.types.numericLiteral(0))]; | ||
@@ -71,0 +75,0 @@ if (array) { |
{ | ||
"name": "@babel/plugin-transform-for-of", | ||
"version": "7.23.3", | ||
"version": "7.23.6", | ||
"description": "Compile ES2015 for...of to ES5", | ||
@@ -20,3 +20,4 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.22.5" | ||
"@babel/helper-plugin-utils": "^7.22.5", | ||
"@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" | ||
}, | ||
@@ -27,3 +28,3 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "^7.23.3", | ||
"@babel/core": "^7.23.6", | ||
"@babel/helper-plugin-test-runner": "^7.22.5" | ||
@@ -30,0 +31,0 @@ }, |
Sorry, the diff of this file is not supported yet
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
44729
344
3