core-js
Version:
Standard library
11 lines (8 loc) • 313 B
JavaScript
var isPossiblePrototype = require('../internals/is-possible-prototype');
var $String = String;
var $TypeError = TypeError;
module.exports = function (argument) {
if (isPossiblePrototype(argument)) return argument;
throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
};
;