Gathering detailed insights and metrics for @chainsafe/abort-controller
Gathering detailed insights and metrics for @chainsafe/abort-controller
Gathering detailed insights and metrics for @chainsafe/abort-controller
Gathering detailed insights and metrics for @chainsafe/abort-controller
npm install @chainsafe/abort-controller
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1 Stars
60 Commits
1 Forks
2 Watching
2 Branches
13 Contributors
Updated on 20 Nov 2021
TypeScript (65.1%)
JavaScript (34.9%)
Cumulative downloads
Total Downloads
Last day
-7.2%
298
Compared to previous day
Last week
5.1%
2,027
Compared to previous week
Last month
14.5%
7,285
Compared to previous month
Last year
279.6%
70,375
Compared to previous year
1
36
An implementation of WHATWG AbortController interface.
1import AbortController from "@chainsafe/abort-controller" 2 3const controller = new AbortController() 4const signal = controller.signal 5 6signal.addEventListener("abort", () => { 7 console.log("aborted!") 8}) 9 10controller.abort()
Use npm to install then use a bundler.
npm install @chainsafe/abort-controller
Or download from dist
directory.
1import AbortController from "@chainsafe/abort-controller" 2// or 3const AbortController = require("@chainsafe/abort-controller") 4 5// or UMD version defines a global variable: 6const AbortController = window.AbortControllerShim
If your bundler recognizes browser
field of package.json
, the imported AbortController
is the native one and it doesn't contain shim (even if the native implementation was nothing).
If you wanted to polyfill AbortController
for IE, use abort-controller/polyfill
.
Importing @chainsafe/abort-controller/polyfill
assigns the AbortController
shim to the AbortController
global variable if the native implementation was nothing.
1import "@chainsafe/abort-controller/polyfill" 2// or 3require("@chainsafe/abort-controller/polyfill")
The AbortSignal object which is associated to this controller.
Notify abort
event to listeners that the signal
has.
Contributing is welcome ❤️
Please use GitHub issues/PRs.
npm install
installs dependencies for development.npm test
runs tests and measures code coverage.npm run clean
removes temporary files of tests.npm run coverage
opens code coverage of the previous test with your default browser.npm run lint
runs ESLint.npm run build
generates dist
codes.npm run watch
runs tests on each file change.No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/23 approved changesets -- 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
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
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