UNPKG

core-js

Version:
10 lines (7 loc) 298 B
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'); };