Created
November 20, 2014 08:06
-
-
Save Sgeo/bc7722305fb3378e28db to your computer and use it in GitHub Desktop.
Corrected version of @HeadDZombie demethodize based on spread syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var demethodize = function(func) { | |
"use strict"; | |
return function(...args) { | |
func.apply(args[0], args.slice(1)) | |
}; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment