un-this.js 371 B

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