UNPKG

305 BJavaScriptView Raw
1'use strict';
2var isObject = require('../internals/is-object');
3
4var $String = String;
5var $TypeError = TypeError;
6
7module.exports = function (argument) {
8 if (argument === undefined || isObject(argument)) return argument;
9 throw new $TypeError($String(argument) + ' is not an object or undefined');
10};