UNPKG

346 BJavaScriptView Raw
1'use strict';
2var isNullOrUndefined = require('../internals/is-null-or-undefined');
3
4var $TypeError = TypeError;
5
6// `RequireObjectCoercible` abstract operation
7// https://tc39.es/ecma262/#sec-requireobjectcoercible
8module.exports = function (it) {
9 if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
10 return it;
11};