MCPcopy Index your code
hub / github.com/nodejs/node / isErrorLike

Function isErrorLike

lib/internal/process/promises.js:147–151  ·  view source on GitHub ↗

* @param {string|Error} obj * @returns {obj is Error}

(obj)

Source from the content-addressed store, hash-verified

145 * @returns {obj is Error}
146 */
147function isErrorLike(obj) {
148 return typeof obj === 'object' &&
149 obj !== null &&
150 ObjectPrototypeHasOwnProperty(obj, 'stack');
151}
152
153/**
154 * @param {0|1|2|3} type

Calls

no outgoing calls

Tested by

no test coverage detected