Licence
—
Version
1.2.3
Deps
0
Size
14 kB
Vulns
0
Weekly
0
abort-helpers
This includes a polyfill for AbortController, and also some utilities
AbortError
You can use AbortError like a generic error emitted from an AbortController. This should even work for DOMExceptions.
try {
checkAbort(AbortSignal.abort());
} catch (e) {
if (e instanceof AbortError) {
// true
}
}