babel-helper-mark-eval-scopes
Advanced tools
Comparing version 0.4.0-alpha.6546ad11 to 0.4.0-alpha.f95869d4
jest.autoMockOff(); | ||
const babel = require("babel-core"); | ||
const babel = require("@babel/core"); | ||
const helper = require("../src"); | ||
@@ -5,0 +5,0 @@ |
"use strict"; | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
var EVAL_SCOPE_MARKER = Symbol("evalInScope"); | ||
module.exports = { | ||
@@ -20,2 +19,3 @@ EVAL_SCOPE_MARKER, | ||
var evalScope = scope; | ||
do { | ||
@@ -34,4 +34,4 @@ evalScopes.add(evalScope); | ||
} | ||
}); | ||
return evalScopes; | ||
@@ -42,5 +42,5 @@ } | ||
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EVAL_SCOPE_MARKER; | ||
var evalScopes = getEvalScopes(path); | ||
var evalScopes = getEvalScopes(path); | ||
[].concat(_toConsumableArray(evalScopes)).forEach(function (scope) { | ||
_toConsumableArray(evalScopes).forEach(function (scope) { | ||
scope[key] = true; | ||
@@ -52,3 +52,2 @@ }); | ||
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EVAL_SCOPE_MARKER; | ||
return Object.prototype.hasOwnProperty.call(scope, key); | ||
@@ -63,3 +62,4 @@ } | ||
} | ||
return scope[key]; | ||
} |
{ | ||
"name": "babel-helper-mark-eval-scopes", | ||
"version": "0.4.0-alpha.6546ad11", | ||
"version": "0.4.0-alpha.f95869d4", | ||
"description": "Mark scopes for deopt which contain a direct eval call", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
4375