Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@solana/promises
Advanced tools
This package contains helpers for using JavaScript promises.
getAbortablePromise(promise, abortSignal?)
Rejects if the abortSignal
is aborted before the promise settles. Resolves or rejects with the value of the promise otherwise.
const result = await getAbortablePromise(
// Resolves or rejects when `fetch` settles.
fetch('https://example.com/json').then(r => r.json()),
// ...unless it takes longer than 5 seconds, after which the `AbortSignal` is triggered.
AbortSignal.timeout(5000),
);
safeRace(...promises)
An implementation of Promise.race
that causes all of the losing promises to settle. This allows them to be released and garbage collected, preventing memory leaks.
Read more here: https://github.com/nodejs/node/issues/17469
FAQs
Helpers for using JavaScript promises
The npm package @solana/promises receives a total of 4,206 weekly downloads. As such, @solana/promises popularity was classified as popular.
We found that @solana/promises demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.