Gathering detailed insights and metrics for fast-abort-controller
Gathering detailed insights and metrics for fast-abort-controller
Gathering detailed insights and metrics for fast-abort-controller
Gathering detailed insights and metrics for fast-abort-controller
npm install fast-abort-controller
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
39 Commits
3 Watching
10 Branches
1 Contributors
Updated on 06 Apr 2022
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
300%
16
Compared to previous day
Last week
-98.5%
85
Compared to previous week
Last month
1,089.6%
5,829
Compared to previous month
Last year
1,026.6%
8,337
Compared to previous year
fast abort controller implementation that can be used as a ponyfill/polyfill
1npm i --save fast-abort-controller
1// esm 2import AbortController from 'fast-abort-controller' 3// commonjs 4const AbortController = require('fast-abort-controller').default
1import AbortController from 'fast-abort-controller' 2 3const controller = new AbortController() 4 5const signal = controller.signal 6 7function cancel() { 8 signal.abort() 9} 10 11try { 12 await fetch('codeshare.io', { signal }) 13 console.log('request success') 14} catch (err) { 15 if (err.name === 'AbortError') { 16 console.warn('request aborted') 17 } else { 18 console.error('request error', err) 19 } 20} 21 22// ...
1import { readFile } from 'fs/promises' 2 3import AbortController from 'fast-abort-controller' 4import raceAbort from 'race-abort' 5 6const controller = new AbortController() 7 8const signal = controller.signal 9 10function cancel() { 11 signal.abort() 12} 13 14try { 15 // readFile doesnt support cancellation so we wrap it with raceAbort provided by another module 'race-abort' 16 await raceAbort(readFile('foo/bar/qux'), signal) 17 console.log('request success') 18} catch (err) { 19 if (err.name === 'AbortError') { 20 console.warn('request aborted') 21 } else { 22 console.error('request error', err) 23 } 24}
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/29 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
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
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
19 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