Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-function-bind

Package Overview
Dependencies
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-function-bind - npm Package Compare versions

Comparing version 7.0.0-alpha.15 to 7.0.0-alpha.16

8

lib/index.js

@@ -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"
}
}
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