@babel/plugin-proposal-function-bind
Advanced tools
Comparing version 7.18.9 to 7.21.4-esm
@@ -7,12 +7,7 @@ "use strict"; | ||
exports.default = void 0; | ||
var _helperPluginUtils = require("@babel/helper-plugin-utils"); | ||
var _pluginSyntaxFunctionBind = require("@babel/plugin-syntax-function-bind"); | ||
var _core = require("@babel/core"); | ||
var _default = (0, _helperPluginUtils.declare)(api => { | ||
api.assertVersion(7); | ||
function getTempId(scope) { | ||
@@ -24,3 +19,2 @@ let id = scope.path.getData("functionBind"); | ||
} | ||
function getObject(bind) { | ||
@@ -30,6 +24,4 @@ if (_core.types.isExpression(bind.object)) { | ||
} | ||
return bind.callee.object; | ||
} | ||
function getStaticContext(bind, scope) { | ||
@@ -39,3 +31,2 @@ const object = getObject(bind); | ||
} | ||
function inferBindContext(bind, scope) { | ||
@@ -45,3 +36,2 @@ const staticContext = getStaticContext(bind, scope); | ||
const tempId = getTempId(scope); | ||
if (bind.object) { | ||
@@ -52,6 +42,4 @@ bind.callee = _core.types.sequenceExpression([_core.types.assignmentExpression("=", tempId, bind.object), bind.callee]); | ||
} | ||
return _core.types.cloneNode(tempId); | ||
} | ||
return { | ||
@@ -71,3 +59,2 @@ name: "proposal-function-bind", | ||
}, | ||
BindExpression(path) { | ||
@@ -81,7 +68,7 @@ const { | ||
} | ||
} | ||
}; | ||
}); | ||
exports.default = _default; | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/plugin-proposal-function-bind", | ||
"version": "7.18.9", | ||
"version": "7.21.4-esm", | ||
"description": "Compile function bind operator to ES5", | ||
@@ -20,11 +20,11 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.18.9", | ||
"@babel/plugin-syntax-function-bind": "^7.18.6" | ||
"@babel/helper-plugin-utils": "^7.21.4-esm", | ||
"@babel/plugin-syntax-function-bind": "^7.21.4-esm" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.0.0-0" | ||
"@babel/core": "^7.0.0-0 || 7.21.4-esm" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.9", | ||
"@babel/helper-plugin-test-runner": "^7.18.6" | ||
"@babel/core": "^7.21.4-esm", | ||
"@babel/helper-plugin-test-runner": "^7.21.4-esm" | ||
}, | ||
@@ -31,0 +31,0 @@ "engines": { |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
10282
6
64
1