* Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow * the ES5 abstract operation `ToObject`. * * @private * @param {*} value Object to check and return. * @returns {*} The provided object.
(value)
| 345 | * @returns {*} The provided object. |
| 346 | */ |
| 347 | function nullThrows(value) { |
| 348 | // null or undefined |
| 349 | if (value == null) { |
| 350 | throw new TypeError('Cannot convert null or undefined to object'); |
| 351 | } |
| 352 | |
| 353 | return value; |
| 354 | } |
| 355 | |
| 356 | /** |
| 357 | * Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values. |
no outgoing calls
no test coverage detected
searching dependent graphs…