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 - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

15

index.js

@@ -16,18 +16,19 @@ 'use strict';

this.length++
if (waiting) {
if (waiting)
waiting(item)
} else {
else
this._items.push(item)
}
}
Queue.prototype.pop = function(cb) { var self = this
var item = this._items.shift()
this.length--
if (item)
if (this._items.length) {
var item = this._items.shift()
this.length--
return Promise.from(item).nodeify(cb)
else
}
else {
return new Promise(function(resolve, reject) {
self._waiting.push(resolve)
}).nodeify(cb)
}
}
{
"name": "then-queue",
"version": "1.1.1",
"version": "1.1.2",
"description": "a simple asynchronous queue",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,1 +22,5 @@ # then-queue

### queue.length
Amount of items in the queue.
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