You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

glov-async

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glov-async - npm Package Compare versions

Comparing version

to
0.0.2

index.d.ts

4

index.js

@@ -100,4 +100,4 @@ const assert = require('assert');

function limiter(max_parallel) {
let avail = max_parallel;
function limiter(limit) {
let avail = limit;
let head = null;

@@ -104,0 +104,0 @@ let tail = null;

{
"name": "glov-async",
"version": "0.0.1",
"version": "0.0.2",
"description": "GLOV.js Async Utility Library",
"main": "index.js",
"types": "index.d.ts",
"keywords": [
"glov",
"glovjs"
],
"author": "Jimb Esser (https://github.com/Jimbly)",

@@ -7,0 +12,0 @@ "repository": {

@@ -6,9 +6,9 @@ GLOV.js async utility library

* Never forces setTimeout/nextTick, so empty lists or synchronous tasks are optimally efficient, creating no inter-generational garbage.
* All parallel async functions (each, eachLimit, parallel, parallelLimit) process every entry and do not return to the final function until all processing is complete, even if some entry errors before then. This avoids terrible edge-case bugs where the calling code things an asynchronous batch has finished executing (because one part of the batch terminated with error), yet some children are still running.
* All parallel async functions (each, eachLimit, parallel, parallelLimit) process every entry and do not return to the final function until all processing is complete, even if some entry errors before then. This avoids terrible edge-case bugs where the calling code thinks an asynchronous batch has finished executing (because one part of the batch terminated with error), yet some children are still running.
Example API usage (admittedly will all actually run synchronously):
```javascript
const { asyncEach, asyncEachLimit, asyncParallel, asyncParallelLimit, asyncLimiter } = require('glovjs-async');
const { asyncEach, asyncEachLimit, asyncParallel, asyncParallelLimit, asyncLimiter } = require('glov-async');
// Also valid:
// const async = require('glovjs-async');
// const async = require('glov-async');
// async.each(...), etc

@@ -20,5 +20,5 @@

console.log(thing);
next();
}, function (err) {
console.log('Done');
next(null, 'baz');
}, function (err, results) {
console.log('Done', results); // prints Done ['baz', 'baz']
});

@@ -58,2 +58,2 @@

console.log('Done');
```
```
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.