core-js
Version:
Standard library
10 lines (7 loc) • 298 B
JavaScript
var isCallable = require('../internals/is-callable');
var $String = String;
var $TypeError = TypeError;
module.exports = function (argument) {
if (typeof argument == 'object' || isCallable(argument)) return argument;
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
};