- 'use strict';
- var GetIntrinsic = require('get-intrinsic');
- var $TypeError = GetIntrinsic('%TypeError%');
- module.exports = function CheckObjectCoercible(value, optMessage) {
- if (value == null) {
- throw new $TypeError(optMessage || ('Cannot call method on ' + value));
- }
- return value;
- };
|