1.2.3 • Published 2 years ago

abort-helpers v1.2.3

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

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
	}
}