react-auto-bind
Advanced tools
Comparing version 0.4.0 to 0.4.1
15
index.js
@@ -5,3 +5,3 @@ /* global define, window */ | ||
var exclude = [ | ||
const exclude = [ | ||
'render', | ||
@@ -11,2 +11,3 @@ 'componentWillReceiveProps', | ||
'componentDidUpdate', | ||
'componentDidCatch', | ||
'shouldComponentUpdate', | ||
@@ -19,5 +20,5 @@ 'componentWillUnmount', | ||
function reactAutoBind(self, ...bindOnly) { | ||
const reactAutoBind = (self, ...bindOnly) => { | ||
((bindOnly.length && bindOnly) || Object.getOwnPropertyNames(self.constructor.prototype)) | ||
.forEach(function (key) { | ||
.forEach(key => { | ||
const val = self[key]; | ||
@@ -33,3 +34,3 @@ | ||
return self; | ||
} | ||
}; | ||
@@ -39,8 +40,6 @@ if (typeof module !== 'undefined' && module.exports) { | ||
} else if (typeof define === 'function' && define.amd) { | ||
// register as 'react-auto-bind', consistent with npm package name | ||
define('react-auto-bind', [], function () { | ||
return reactAutoBind; | ||
}); | ||
// Register as 'react-auto-bind', consistent with npm package name | ||
define('react-auto-bind', [], () => reactAutoBind); | ||
} else { | ||
window.reactAutoBind = reactAutoBind; | ||
} |
{ | ||
"name": "react-auto-bind", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Auto bind methods to their class instance excluding React Lifecycle Methods", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
6049
61