Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

then-queue

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

then-queue

a simple asynchronous queue

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
315
decreased by-25.53%
Maintainers
2
Weekly downloads
 
Created
Source

then-queue

a simple asynchronous queue

Build Status Dependency Status NPM version

Installation

npm install then-queue

API

new Queue()

var Queue = require('then-queue');
var q = new Queue();

A fresh queue!

queue.push(item)

Push an item onto the queue

queue.pop() -> Promise Item

Pop an item from the queue

queue.length

Amount of items in the queue (note that this can be negative if pop has been called more times than push).

Events

The length-changed event gets emitted whenever pop or push has been called. You could use it to spawn/kill workers when the length changes.

Keywords

FAQs

Package last updated on 17 Oct 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc