Gathering detailed insights and metrics for composite-abort-controller
Gathering detailed insights and metrics for composite-abort-controller
Gathering detailed insights and metrics for composite-abort-controller
Gathering detailed insights and metrics for composite-abort-controller
npm install composite-abort-controller
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
27 Commits
3 Watching
6 Branches
1 Contributors
Updated on 30 Dec 2023
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
1,100%
12
Compared to previous day
Last week
-97.4%
73
Compared to previous week
Last month
749.6%
2,948
Compared to previous month
Last year
859.1%
4,498
Compared to previous year
abort controller and abort signal classes that compose multiple abort signals
1npm i --save composite-abort-controller
1// esm 2import CompositeAbortController from 'composite-abort-controller' 3// commonjs 4const CompositeAbortController = require('composite-abort-controller').default
1import CompositeAbortController from 'composite-abort-controller' 2 3const sourceControllers = [ 4 new AbortController(), 5 new AbortController(), 6 new AbortController(), 7] 8const sourceSignals = sourceControllers.map((c) => c.signal) 9 10const controller = new CompositeAbortController(sourceSignals) 11const signal = controller.signal() 12console.log(signal.aborted) // false 13signal.addEventListener('abort', handleAbort) 14 15sourceControllers.forEach((controller) => controller.abort()) 16console.log(signal.aborted) // true 17function handleAbort() { 18 console.log('all signals aborted') 19}
1import { CompositeAbortSignal } from 'composite-abort-controller' 2 3const sourceControllers = [ 4 new AbortController(), 5 new AbortController(), 6 new AbortController(), 7] 8const sourceSignals = sourceControllers.map((c) => c.signal) 9 10const signal = new CompositeAbortSignal(sourceSignals) 11console.log(signal.aborted) // false 12signal.addEventListener('abort', handleAbort) 13 14sourceControllers.forEach((controller) => controller.abort()) 15console.log(signal.aborted) // true 16function handleAbort() { 17 console.log('all signals aborted') 18}
1const compositeAbortController = new CompositeAbortController(sourceSignals) 2const newController = new AbortController() 3 4compositeAbortController.addSignal(newController.signal)
1const compositeAbortController = new CompositeAbortController(sourceSignals) 2const compositeAbortSignal = compositeAbortController.signal 3const newController = new AbortController() 4 5compositeAbortSignal.add(newController.signal)
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More