mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
a3456b7e1c
* Adds `bind`, `isFinite`, and `isNumber` utility functions from lodash. * Use new util funtions instead of lodash throughout the codebase. * Remove lodash from vendor builds.
16 lines
291 B
JavaScript
16 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;
|