Skip to content

Instantly share code, notes, and snippets.

@gbedardsice
Created May 9, 2014 15:07
Show Gist options
  • Save gbedardsice/a154e55b5cdd0db053f7 to your computer and use it in GitHub Desktop.
Save gbedardsice/a154e55b5cdd0db053f7 to your computer and use it in GitHub Desktop.
Function.prototype.bind - Underscore polyfill
if (!Function.prototype.bind) {
Function.prototype.bind = function() {
var args = _.toArray(arguments);
args.unshift(this);
return _.bind.apply(null, args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment