rename-function
Advanced tools
Comparing version 1.0.4 to 1.0.5
## 1.0.5 - 2016-04-15 | ||
- Release v1.0.5 / npm@v1.0.5 | ||
- add test to ensure the fix for #2 | ||
- fix #2, always create new function and return it | ||
## 1.0.4 - 2016-04-14 | ||
@@ -4,0 +9,0 @@ - Release v1.0.4 / npm@v1.0.4 |
@@ -57,6 +57,2 @@ /*! | ||
if (fnName === name && !utils.isExtendable(ctx)) { | ||
return fn | ||
} | ||
var str = format('return function %s() { return fn.apply(ctx || this, arguments) }', name) | ||
@@ -63,0 +59,0 @@ var func = (new Function('fn', 'ctx', str))(fn, ctx || this) // eslint-disable-line no-new-func |
{ | ||
"name": "rename-function", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Rename a given function. Tries to be cross-platform and guaranteed. Useful when you want to preserve name of bound function. In bonus, allows passing context to the renamed function.", | ||
@@ -5,0 +5,0 @@ "repository": "tunnckoCore/rename-function", |
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
14255
94