Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
asyncQueue
✓ const asyncQueue = require('rygr.async-queue')
✗ import asyncQueue from 'rygr.async-queue'
This library uses CommonJS, not ESM. Use require() for both Node.js and browser (browserify/webpack).
default import
✓ const asyncQueue = require('rygr.async-queue')
✗ import * as asyncQueue from 'rygr.async-queue'
The module exports a single function directly; no named exports.
TypeScript usage
✓ const asyncQueue: (...args: any[]) => void = require('rygr.async-queue')
✗ import asyncQueue from 'rygr.async-queue'
No TypeScript definitions; use require and manual typing.
Demonstrates async queue with argument passing, error propagation, and done callback.
const asyncQueue = require('rygr.async-queue');
const first = (name, next) => {
console.log(`${name}: first!`);
next();
};
const second = (name, next) => {
throw new Error('Uhoh!');
};
const third = (name, next) => {
console.log(`${name}: third!`);
};
const errorHandler = (error, name, next) => {
console.log(error.message);
next(error);
};
const done = (error) => {
console.log(error ? "Something went wrong." : "Success!");
};
asyncQueue(['Test'], [first, second, third, errorHandler], done);
// Output: Test: first!\nUhoh!\nSomething went wrong.
Errors
Common errors & fixes
TypeError: asyncQueue is not a function
Using ES6 import syntax with a CommonJS module.
fixChange to const asyncQueue = require('rygr.async-queue'). ReferenceError: next is not defined
Forgetting to pass next function to queue functions or incorrect order of arguments.
fixEnsure each queue function receives next as last parameter and calls it.
Error: Cannot find module 'q'
Missing required dependency 'q' for Node.js.
fixRun npm install q or include it in package.json.
Audit
Dependencies
qrequiredNode build dependency for promise support
jqueryoptionalBrowser build dependency