
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
await-cycle
Advanced tools
It accepts an array for enumeration and an async function, the result of which returns a promise. Calls a function on each element of the array, further code execution will wait until all functions return resolve
The function within which the cycle is executed is called in the asynchronous block. Accepts an async function that should return a promise. Will be resolve when all transferred functions are resolved. The transferred functions are called parallel!
$ yarn add await-cycle
or
$ npm i await-cycle
const awaitCycle = require("await-cycle");
const arr = ["a", "b", "c", "d"];
const delay = (item, idx) => {
return new Promise(resolve =>
setTimeout(() => {
console.log(`in item ${item} - ${idx}`);
resolve();
}, 500)
);
};
(async () => {
await awaitCycle(arr, (item, idx) => delay(item, idx));
console.log("after!");
})();
in item a - 0
in item b - 1
in item c - 2
in item d - 3
after!
FAQs
It accepts an array for enumeration and an async function, the result of which returns a promise. Calls a function on each element of the array, further code execution will wait until all functions return resolve
The npm package await-cycle receives a total of 3 weekly downloads. As such, await-cycle popularity was classified as not popular.
We found that await-cycle 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
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.