@babel/helper-call-delegate
Advanced tools
Comparing version 7.0.0-beta.43 to 7.0.0-beta.44
@@ -9,5 +9,5 @@ "use strict"; | ||
function _helperHoistVariables() { | ||
const data = _interopRequireDefault(require("@babel/helper-hoist-variables")); | ||
var data = _interopRequireDefault(require("@babel/helper-hoist-variables")); | ||
_helperHoistVariables = function () { | ||
_helperHoistVariables = function _helperHoistVariables() { | ||
return data; | ||
@@ -20,5 +20,5 @@ }; | ||
function t() { | ||
const data = _interopRequireWildcard(require("@babel/types")); | ||
var data = _interopRequireWildcard(require("@babel/types")); | ||
t = function () { | ||
t = function t() { | ||
return data; | ||
@@ -34,4 +34,4 @@ }; | ||
const visitor = { | ||
enter(path, state) { | ||
var visitor = { | ||
enter: function enter(path, state) { | ||
if (path.isThisExpression()) { | ||
@@ -47,20 +47,22 @@ state.foundThis = true; | ||
}, | ||
Function(path) { | ||
Function: function Function(path) { | ||
path.skip(); | ||
} | ||
}; | ||
function _default(path, scope = path.scope) { | ||
const { | ||
node | ||
} = path; | ||
const container = t().functionExpression(null, [], node.body, node.generator, node.async); | ||
let callee = container; | ||
let args = []; | ||
(0, _helperHoistVariables().default)(path, id => scope.push({ | ||
id | ||
})); | ||
const state = { | ||
function _default(path, scope) { | ||
if (scope === void 0) { | ||
scope = path.scope; | ||
} | ||
var node = path.node; | ||
var container = t().functionExpression(null, [], node.body, node.generator, node.async); | ||
var callee = container; | ||
var args = []; | ||
(0, _helperHoistVariables().default)(path, function (id) { | ||
return scope.push({ | ||
id: id | ||
}); | ||
}); | ||
var state = { | ||
foundThis: false, | ||
@@ -85,5 +87,5 @@ foundArguments: false | ||
let call = t().callExpression(callee, args); | ||
var call = t().callExpression(callee, args); | ||
if (node.generator) call = t().yieldExpression(call, true); | ||
return t().returnStatement(call); | ||
} |
{ | ||
"name": "@babel/helper-call-delegate", | ||
"version": "7.0.0-beta.43", | ||
"version": "7.0.0-beta.44", | ||
"description": "Helper function to call delegate", | ||
@@ -9,6 +9,6 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-call-delegate", | ||
"dependencies": { | ||
"@babel/helper-hoist-variables": "7.0.0-beta.43", | ||
"@babel/traverse": "7.0.0-beta.43", | ||
"@babel/types": "7.0.0-beta.43" | ||
"@babel/helper-hoist-variables": "7.0.0-beta.44", | ||
"@babel/traverse": "7.0.0-beta.44", | ||
"@babel/types": "7.0.0-beta.44" | ||
} | ||
} |
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
2762
69
+ Added@babel/code-frame@7.0.0-beta.44(transitive)
+ Added@babel/generator@7.0.0-beta.44(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.44(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.44(transitive)
+ Added@babel/helper-hoist-variables@7.0.0-beta.44(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.44(transitive)
+ Added@babel/highlight@7.0.0-beta.44(transitive)
+ Added@babel/template@7.0.0-beta.44(transitive)
+ Added@babel/traverse@7.0.0-beta.44(transitive)
+ Added@babel/types@7.0.0-beta.44(transitive)
+ Addedbabylon@7.0.0-beta.44(transitive)
- Removed@babel/code-frame@7.0.0-beta.43(transitive)
- Removed@babel/generator@7.0.0-beta.43(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.43(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.43(transitive)
- Removed@babel/helper-hoist-variables@7.0.0-beta.43(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.43(transitive)
- Removed@babel/highlight@7.0.0-beta.43(transitive)
- Removed@babel/template@7.0.0-beta.43(transitive)
- Removed@babel/traverse@7.0.0-beta.43(transitive)
- Removed@babel/types@7.0.0-beta.43(transitive)
- Removedbabylon@7.0.0-beta.43(transitive)
Updated@babel/types@7.0.0-beta.44