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.9.0 to 7.10.0

16

lib/index.js

@@ -20,3 +20,4 @@ "use strict";

loose,
assumeArray
assumeArray,
allowArrayLike
} = options;

@@ -28,2 +29,10 @@

if (assumeArray === true && allowArrayLike === true) {
throw new Error(`The assumeArray and allowArrayLike options cannot be used together in @babel/plugin-transform-for-of`);
}
if (allowArrayLike && /^7\.\d\./.test(api.version)) {
throw new Error(`The allowArrayLike is only supported when using @babel/core@^7.10.0`);
}
if (assumeArray) {

@@ -90,3 +99,3 @@ return {

const buildForOfLoose = _core.template.statements(`
for (var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT), STEP_KEY;
for (var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ALLOW_ARRAY_LIKE), STEP_KEY;
!(STEP_KEY = ITERATOR_HELPER()).done;) BODY;

@@ -96,3 +105,3 @@ `);

const buildForOf = _core.template.statements(`
var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT), STEP_KEY;
var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ALLOW_ARRAY_LIKE), STEP_KEY;
try {

@@ -187,2 +196,3 @@ for (ITERATOR_HELPER.s(); !(STEP_KEY = ITERATOR_HELPER.n()).done;) BODY;

ITERATOR_HELPER: scope.generateUidIdentifier("iterator"),
ALLOW_ARRAY_LIKE: allowArrayLike ? _core.types.booleanLiteral(true) : null,
STEP_KEY: _core.types.identifier(stepKey),

@@ -189,0 +199,0 @@ OBJECT: node.right,

6

package.json
{
"name": "@babel/plugin-transform-for-of",
"version": "7.9.0",
"version": "7.10.0",
"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.9.0",
"@babel/core": "^7.10.0",
"@babel/helper-plugin-test-runner": "^7.8.3"
},
"gitHead": "8d5e422be27251cfaadf8dd2536b31b4a5024b02"
"gitHead": "5da2440adff6f25579fb6e9a018062291c89416f"
}
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