Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@jcoreio/abortable
Advanced tools
memory-leak-proof function to wrap a promise to reject when a signal is aborted
memory-leak-proof function to wrap a promise to reject when a signal is aborted
abortable(promise, signal)
Creates a promise that fulfills when the given promise
fulfills, or rejects when the given signal
is aborted,
whichever comes first. If the signal is aborted, rejects with a DOMException
with name: 'AbortError'
.
Once the returned promise resolves or rejects, references to all promise and signal handlers will have been removed, so that it doesn't unexpectedly retain any memory.
import { abortable } from '@jcoreio/abortable'
const abortController = new AbortContorller()
const { signal } = abortController
const promise = abortable(new Promise((r) => setTimeout(r, 10000)), signal)
FAQs
memory-leak-proof function to wrap a promise to reject when a signal is aborted
The npm package @jcoreio/abortable receives a total of 798 weekly downloads. As such, @jcoreio/abortable popularity was classified as not popular.
We found that @jcoreio/abortable demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.