mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-29 07:25:05 +08:00
13 lines
325 B
JavaScript
13 lines
325 B
JavaScript
|
|
var FunctionPrototype = Function.prototype;
|
||
|
|
var bind = FunctionPrototype.bind;
|
||
|
|
var call = FunctionPrototype.call;
|
||
|
|
var callBind = bind && bind.bind(call);
|
||
|
|
|
||
|
|
module.exports = bind ? function (fn) {
|
||
|
|
return fn && callBind(call, fn);
|
||
|
|
} : function (fn) {
|
||
|
|
return fn && function () {
|
||
|
|
return call.apply(fn, arguments);
|
||
|
|
};
|
||
|
|
};
|