an-object.js 286 B

12345678910
  1. var isObject = require('../internals/is-object');
  2. var $String = String;
  3. var $TypeError = TypeError;
  4. // `Assert: Type(argument) is Object`
  5. module.exports = function (argument) {
  6. if (isObject(argument)) return argument;
  7. throw $TypeError($String(argument) + ' is not an object');
  8. };