spy-on-component
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -12,3 +12,2 @@ | ||
function wrap(base, method) { | ||
@@ -26,5 +25,5 @@ var before = true; | ||
return function wrappedLifecyclehook() { | ||
before && method.apply(arguments) | ||
base.apply(arguments) | ||
!before && method.apply(arguments) | ||
before && method.apply(this, arguments) | ||
base.apply(this, arguments) | ||
!before && method.apply(this, arguments) | ||
} | ||
@@ -36,2 +35,3 @@ } | ||
for (var key in hooks) if (LIFECYCLE_HOOKS[key]) | ||
@@ -38,0 +38,0 @@ component[key] = wrap( |
{ | ||
"name": "spy-on-component", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Subscribe to React component lifecycle hooks", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
2394