
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
lightweight async foreach thing with typings written at 1am.
import { forEach } from 'epic-async';
// each task takes a different amount of time to complete
const array = [1000, 5000, 100, 2000];
async function go() {
// however, it will not continue until the previous iteration completes
// you can also use .then instead of await if you want but i don't see why you'd do that
// or you could do neither
await forEach(array, async (value, callback, i) => {
console.log(`wait for ${value}ms. index: ${i}`);
await stall(value as number); // stall/wait "value" milliseconds before continuing to the next value in the array
callback();
});
console.log('done');
}
function stall(time: number) {
return new Promise(resolve => setTimeout(resolve, time));
}
go();
wait for 1000ms. Index: 0
wait for 5000ms. Index: 1
wait for 100ms. Index: 2
wait for 2000ms. index: 3
done
FAQs
lightweight async foreach thing with typings written at 1am.
We found that epic-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.