0.3.32 • Published 2 years ago
@nodesuite/abort v0.3.32
@nodesuite/abort
Summary
Simplified wrapper for native AbortController
.
Install
# PNPM
pnpm install @nodesuite/abort
# Yarn
yarn install @nodesuite/abort
# NPM
npm install @nodesuite/abort
Example
import { Abort, type AbortManager } from "@nodesuite/abort"
const abort: AbortManager = new Abort()
// Less verbose listeners.
abort.onAbort(() => console.log(`Aborted!`))
// Feeback
const result: boolean | Error = abort.abort()
Native AbortController
Comparison
const abort: AbortController = new AbortController()
// Complex listener defintion.
abort.signal.addEventListener("abort", () => console.log(`Aborted!`), {
once: true
})
// No result feeback...
abort.abort()
0.3.31
2 years ago
0.3.30
2 years ago
0.3.32
2 years ago
0.3.29
2 years ago
0.3.28
2 years ago
0.3.27
2 years ago
0.3.26
3 years ago
0.3.25
3 years ago
0.3.24
3 years ago
0.3.23
3 years ago
0.3.22
3 years ago
0.3.21
3 years ago
0.3.20
3 years ago
0.3.19
3 years ago
0.3.18
3 years ago
0.3.17
3 years ago
0.3.16
3 years ago
0.3.15
3 years ago
0.3.14
3 years ago
0.3.13
3 years ago
0.3.12
3 years ago
0.3.11
3 years ago
0.3.10
3 years ago
0.3.9
3 years ago
0.3.8
3 years ago
0.3.7
3 years ago
0.3.6
3 years ago
0.3.5
3 years ago
0.3.4
3 years ago
0.2.2
3 years ago