Socket
Socket
Sign inDemoInstall

babel-plugin-autobind-class-methods

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.2.0

8

lib/index.js

@@ -18,6 +18,6 @@ 'use strict';

this.types = types;
this.path = path;
this.isClassDeclaration = isClassDeclaration;
this.classBody = this.path.get('body');
this.selfIndentifier = isClassDeclaration ? this.path.node.id : this.types.thisExpression();
this.classBody = path.get('body');
this.selfIndentifier = isClassDeclaration ? path.node.id : this.types.thisExpression();
this.currentPath = path.parentPath.isExportDeclaration() ? path.parentPath : path;
}

@@ -70,3 +70,3 @@

value: function addBoundMethodExpressions(boundMethodExpressions) {
return this.isClassDeclaration ? this.path.insertAfter(boundMethodExpressions) : this.classBody.pushContainer('body', boundMethodExpressions);
return this.isClassDeclaration ? this.currentPath.insertAfter(boundMethodExpressions) : this.classBody.pushContainer('body', boundMethodExpressions);
}

@@ -73,0 +73,0 @@ }]);

{
"name": "babel-plugin-autobind-class-methods",
"version": "4.1.0",
"version": "4.2.0",
"description": "Babel plugin that binds every class method to \"this\" with hot reload support",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc