
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
stack-queue
Advanced tools
Execution stacks compatible with promises
npm install --save stack-queue
Have you ever used express or connect?
If so, you should know how they share they stack with function ( req, res, next ).
This module allows you to apply a nextable queue method in any circunstance, and compatible with promises!
Lets see some examples:
This is how you would implement a connect-like example:
var http = require( 'http' ),
Stack = require( 'stack-queue' );
var stack = new Stack(),
server = http.createServer( stack.dispatch.bind( stack ) ).listen( 80 );
// Now you should be able to stack things on request
stack.queue( function ( req, res, next ) {
req.foo = 'bar';
next();
});
// You can even chain stack.queue calls
stack
.queue(function ( req, res ) {
res.statusCode = 200;
return somePromisedMethod();
})
.queue(function ( req, res, next ) {
res.write( 'hey' );
next();
});
// Or provide an array with functions
stack.queue([
function () { return true; },
function () { throw new Error("WOW"); }
]);
Please Pull Request them! :)
FAQs
Execution stacks compatible with promises
We found that stack-queue 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.