babel-plugin-transform-function-bind
Advanced tools
Comparing version 7.0.0-alpha.15 to 7.0.0-alpha.16
@@ -11,3 +11,2 @@ "use strict"; | ||
if (id) return id; | ||
id = scope.generateDeclaredUidIdentifier("context"); | ||
@@ -25,4 +24,4 @@ return scope.path.setData("functionBind", id); | ||
if (staticContext) return staticContext; | ||
var tempId = getTempId(scope); | ||
var tempId = getTempId(scope); | ||
if (bind.object) { | ||
@@ -33,2 +32,3 @@ bind.callee = t.sequenceExpression([t.assignmentExpression("=", tempId, bind.object), bind.callee]); | ||
} | ||
return tempId; | ||
@@ -39,3 +39,2 @@ } | ||
inherits: _babelPluginSyntaxFunctionBind2.default, | ||
visitor: { | ||
@@ -45,6 +44,4 @@ CallExpression: function CallExpression(_ref2) { | ||
scope = _ref2.scope; | ||
var bind = node.callee; | ||
if (!t.isBindExpression(bind)) return; | ||
var context = inferBindContext(bind, scope); | ||
@@ -57,3 +54,2 @@ node.callee = t.memberExpression(bind.callee, t.identifier("call")); | ||
scope = path.scope; | ||
var context = inferBindContext(node, scope); | ||
@@ -60,0 +56,0 @@ path.replaceWith(t.callExpression(t.memberExpression(node.callee, t.identifier("bind")), [context])); |
{ | ||
"name": "babel-plugin-transform-function-bind", | ||
"version": "7.0.0-alpha.15", | ||
"version": "7.0.0-alpha.16", | ||
"description": "Compile function bind operator to ES5", | ||
@@ -12,7 +12,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-function-bind", | ||
"dependencies": { | ||
"babel-plugin-syntax-function-bind": "7.0.0-alpha.15" | ||
"babel-plugin-syntax-function-bind": "7.0.0-alpha.16" | ||
}, | ||
"devDependencies": { | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.15" | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.16" | ||
} | ||
} |
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
4790
+ Addedbabel-plugin-syntax-function-bind@7.0.0-alpha.16(transitive)
- Removedbabel-plugin-syntax-function-bind@7.0.0-alpha.15(transitive)