debian-mirror-gitlab/core-js/es/instance/bind.js
2019-09-25 13:30:05 +05:30

8 lines
261 B
JavaScript

var bind = require('../function/virtual/bind');
var FunctionPrototype = Function.prototype;
module.exports = function (it) {
var own = it.bind;
return it === FunctionPrototype || (it instanceof Function && own === FunctionPrototype.bind) ? bind : own;
};