0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/client/app/utils/bind.js
2015-03-11 12:37:41 -06:00

15 lines
291 B
JavaScript

var slice = Array.prototype.slice;
function bind(/* func, args, thisArg */) {
var args = slice.call(arguments),
func = args.shift(),
thisArg = args.pop();
function bound() {
return func.apply(thisArg, args);
}
return bound;
}
export default bind;