an-instance.js 254 B

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