
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
queue-that-promise
Advanced tools
Push promises to a queue. The queue runs in order. That's all. 500b gzipped.
$ npm install --save queue-that-promise
var Queue = require('queue-that-promise')
var queue = Queue()
queue.add(() => new Promise((resolve) => setTimeout(resolve, 100))
.then(() => console.log('first'))
queue.add(() => new Promise((resolve) => setTimeout(resolve, 100))
.then(() => console.log('second'))
queue.add(() => new Promise((resolve) => setTimeout(resolve, 100))
.then(() => console.log('third'))
queue.done().then(() => console.log('done'))
// Wait 100ms...
// => "first"
// Wait 100ms...
// => "second"
// Wait 100ms...
// => "third"
// => "done"
Queue()
-> queue
Returns a queue instance.
queue.done() -> Promise
Returns a promise that will be resolved once the queue is empty.
queue.add(callback<Promise> | Array<callback<Promise>>) -> Promise
Adds a callback or multiple callbacks to the queue.
The callback will run after all previously added callbacks have finished.
Returns a promise that will be resolved or rejected once the given callback's returned promise is resolved or rejected.
queue.count() -> number
Returns the current length of the queue.
MIT © Andrew Joslin
FAQs
Push promises to a queue. The queue runs. That's all.
The npm package queue-that-promise receives a total of 152 weekly downloads. As such, queue-that-promise popularity was classified as not popular.
We found that queue-that-promise 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.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.