un-this.js 357 B

123456789
  1. var isPrototypeOf = require('../../internals/object-is-prototype-of');
  2. var method = require('../function/virtual/un-this');
  3. var FunctionPrototype = Function.prototype;
  4. module.exports = function (it) {
  5. var own = it.unThis;
  6. return it === FunctionPrototype || (isPrototypeOf(FunctionPrototype, it) && own === FunctionPrototype.unThis) ? method : own;
  7. };