an-instance.js 286 B

123456789
  1. var global = require('../internals/global');
  2. var isPrototypeOf = require('../internals/object-is-prototype-of');
  3. var TypeError = global.TypeError;
  4. module.exports = function (it, Prototype) {
  5. if (isPrototypeOf(Prototype, it)) return it;
  6. throw TypeError('Incorrect invocation');
  7. };