abort-helpers
v1.2.3
Published
AbortController polyfill and utilities
Downloads
9
Maintainers
Readme
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 DOMException
s.
try {
checkAbort(AbortSignal.abort());
} catch (e) {
if (e instanceof AbortError) {
// true
}
}