foxts
Version:
Opinionated collection of common TypeScript utils by @SukkaW
1 lines • 342 B
JavaScript
import{isErrorLikeObject as r}from"../extract-error-message/index.mjs";class o extends Error{name="AbortError";code="ABORT_ERR";constructor(r="The operation was aborted",o){super(r,o)}}function e(o){return!!r(o)&&("AbortError"===o.name||"code"in o&&"string"==typeof o.code&&"ABORT_ERR"===o.code)}export{o as AbortError,e as isAbortErrorLike};