core-js
Version:
Standard library
11 lines (8 loc) • 312 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');
};