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 1.0.1 to 1.0.2

18

index.js

@@ -30,13 +30,6 @@ 'use strict'

var newNodes = methods.map((method)=>
t.assignmentExpression(
"=",
t.memberExpression(t.thisExpression(), method),
t.functionExpression(null,[],
t.blockStatement([
template('return _makeJsClassGreatAgain(_this, \'' + method.name + '\', arguments)')({})
])
)
)
)
var newNodes = methods.map((method)=> {
return template('THIS.METHOD = ()=> _makeJsClassGreatAgain(THIS, \'' + method.name + '\', arguments)')({THIS: t.thisExpression(), METHOD: method})
}
);

@@ -55,5 +48,2 @@ if (!constructor) {

})
constructor.get("body").insertAfter(template(`var _this = this;`)({}))
}

@@ -60,0 +50,0 @@ }

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

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

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