Minimal async task queue that runs an array of functions in series, passing results between them. Version 0.2.1 is the latest and only release. Simple alternative to async.waterfall or p-series, with no dependencies. Provides two modes: direct execution with shared default arguments, and chaining where each function receives the previous function's result. Error handling stops the chain and passes the error to the final callback. Ideal for small Node.js scripts or legacy codebases that need a lightweight serial execution pattern.
npm install drainerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows two usage patterns: chaining results between functions, and passing default arguments to all functions.
Always call next(null, result) to pass results, or next(err) to signal error.
Consider modern alternatives like p-series, async/waterfall, or for-await-of loops.
Clone or copy arguments if you need to avoid mutation.
Use const drainer = require('drainer');Ensure each function in the array accepts at least one argument (the callback) or the correct number of default args + next.
Always attach a final callback with (err, result) => { ... } and check err.No dependency data recorded yet.