Ghost/ghost/admin/utils/bind.js

16 lines
291 B
JavaScript
Raw Normal View History

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;