Created
April 5, 2015 21:01
-
-
Save radist2s/4dfb0640ce94555aa7a8 to your computer and use it in GitHub Desktop.
Function.prototype.bind polyfill with underscore _.bind
This file contains 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
if (!Function.prototype.bind) { | |
Function.prototype.bind = function () { | |
return _.bind.apply(_, [this].concat(_.toArray(arguments))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment