All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.internals.require-object-coercible.js Maven / Gradle / Ivy

The newest version!
'use strict';
var isNullOrUndefined = require('../internals/is-null-or-undefined');

var $TypeError = TypeError;

// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  return it;
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy