opinionated-machine
Version:
Very opinionated DI framework for fastify, built on top of awilix
11 lines • 353 B
JavaScript
/**
* Check if a value is an Error-like object (cross-realm safe).
* Uses duck typing instead of instanceof for reliability across realms.
*/
export function isErrorLike(err) {
return (typeof err === 'object' &&
err !== null &&
'message' in err &&
typeof err.message === 'string');
}
//# sourceMappingURL=errorUtils.js.map