UNPKG

rename-function

Version:

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.

37 lines (29 loc) 862 B
## 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 - Release v1.0.4 / npm@v1.0.4 - update docs - add "how it works" section - ensure native bind behavior ## 1.0.3 - 2016-04-14 - Release v1.0.3 / npm@v1.0.3 - refactor - add more tests ## 1.0.2 - 2016-04-14 - Release v1.0.2 / npm@v1.0.2 - fix to work correctly for anonymous function - allow passing context to anonymous function (kinda strange, lol) ## 1.0.1 - 2016-04-14 - Release v1.0.1 / npm@v1.0.1 - update description and docs - allow passing context as third argument or as bind/call/apply-ing `renameFunction` ## 1.0.0 - 2016-04-14 - Release v1.0.0 / npm@v1.0.0 - add keywords - tweaks - docs comments and readme - implement :cat2: (push to github) ## 0.0.0 - 2016-04-14 - Initial commit