
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
delay-map-batch
Advanced tools
Enumerate array by batch, there will be a delay in milliseconds before processing the next batch.
Enumerate array by batch, there will be a delay in milliseconds before processing the next batch.
Node
var DelayMapBatch = require('delay-map-batch');
Browser
<script type='text/javascript' src='delay-map-batch.min.js'></script>
DelayMapBatch([1,2,3,4,5], (n, index)=>{
//Do some stuff
console.log(n);
}, {
batchSize: 1000,
}).then(()=>{
//Mapping finished
});
With 2s delay between batches:
DelayMapBatch([1,2,3,4,5], (n, index)=>{
//Do some stuff
console.log(n);
}, {
batchSize: 1000,
delay: 2000,
}).then(()=>{
//Mapping finished
});
DelayMapBatch(array, mapFunction, [params])Parameters
array: The array to be enumerated.mapFunction: The function called for each element of the array, accept 2 parameters, first is the element enumerated, second is the index of the element in the array.params: Parameters for enumerating array.Returns
A Promise() object, you can use then() to add functions to be executed after enumeration finished, or add catch() to catch exceptions when there is anything thrown from the map function.
Run npm test to run the test cases.
FAQs
Enumerate array by batch, there will be a delay in milliseconds before processing the next batch.
We found that delay-map-batch 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
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.