
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
A simple asynchronous function queue, executing either sequentially or in parallel.
$ npm install funq --save
...or:
$ yarn add funq
Create a new instance of Funq(). Each object will have a push() method, taking a callback as an argument
and sequential() and parallel() methods to kick the whole process off. The constructor function takes
a completion callback with an error value which will either contain an error object/string, etc.. or be null
if no errors were passed back, this is called once the whole chain of functions have finished.
If parallel() is used, then all functions pushed to the instance will run immediately and the
completion callback will be called once the slowest function has finished, otherwise, using sequential()
everything will run in order and take as long as all the functions take to complete. Also you can
optionally pass a value back (i.e. done([value])) which will complete the sequence early.
Example:
const Funq = require('funq')
const queue = new Funq((err, value) => {
if (err) return console.log(err) // an error was passed back and the sequence ended early
// otherwise do stuff after sequence is fully completed
})
queue.push((fail, done) => {
// do some async work and either fail with an error
// or mark successfull with done
// optionally pass a value back, this also has the effect
// or completing the sequence early
done({pass: 'value back'})
})
queue.push((fail, done) => {
fail(new Error('an error occurred'))
})
queue.push((fail, done) => {
// won't be called because error was passed back
})
queue.sequential() // or `.parallel()`
Use browserify or similar.
FAQs
a simple asynchronous function queue
We found that funq 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.