mirror of
https://github.com/KieSun/all-of-frontend.git
synced 2024-11-23 07:18:13 +08:00
12 lines
256 B
JavaScript
12 lines
256 B
JavaScript
'use strict';
|
|
|
|
module.exports = function bind(fn, thisArg) {
|
|
return function wrap() {
|
|
var args = new Array(arguments.length);
|
|
for (var i = 0; i < args.length; i++) {
|
|
args[i] = arguments[i];
|
|
}
|
|
return fn.apply(thisArg, args);
|
|
};
|
|
};
|