
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
Race multiple async operations with automatic AbortSignal cleanup for losers
Race multiple async operations with automatic AbortSignal cleanup for losers
npm install abort-race
import abortRace from 'abort-race';
const result = await abortRace([
async signal => {
const response = await fetch('https://api1.example.com', {signal});
return response.json();
},
async signal => {
const response = await fetch('https://api2.example.com', {signal});
return response.json();
},
]);
console.log(result);
// The response from whichever API responded first.
// The other request was automatically aborted.
Race multiple async operations. The first task to resolve wins, and all other tasks are automatically aborted via their AbortSignal. If a task throws, all others are aborted and the error is re-thrown.
Returns a Promise that resolves with the winning task's result.
Type: Array<(signal: AbortSignal) => Promise<T>>
An array of functions that each receive an AbortSignal and return a Promise.
Type: object
Type: AbortSignal
An external AbortSignal for cancelling all tasks. When this signal aborts, all tasks are aborted.
MIT
FAQs
Race multiple async operations with automatic AbortSignal cleanup for losers
We found that abort-race demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.