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

queue

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queue - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

2

index.js

@@ -131,2 +131,2 @@ var inherits = require('inherits');

this.emit('end', err);
};
}
{
"name": "queue",
"version": "3.0.0",
"version": "3.0.1",
"description": "async job queue with adjustable concurrency",

@@ -5,0 +5,0 @@ "repository": {

@@ -8,3 +8,3 @@ ```

```
manage concurrent asynchronous operations in javascript.
manage asynchronous operations.

@@ -14,3 +14,3 @@ [![browser support](http://ci.testling.com/jessetane/queue.png)](http://ci.testling.com/jessetane/queue)

## why
[`async`](https://github.com/caolan/async) is a huge library, offering a huge number of abstractions for accomplishing the same thing.
[async](https://github.com/caolan/async) is a big libray offering many approaches to dealing with asynchrony; `queue` offers a single, flexible abstraction with a familiar API.

@@ -35,3 +35,3 @@ ## how

// add jobs using the familiar Array API
// add jobs using the Array API

@@ -99,6 +99,6 @@ q.push(function(cb) {

## require
### `var queue = require('queue')`
#### `var queue = require('queue')`
## constructor
### `var q = queue([opts])`
#### `var q = queue([opts])`
where `opts` may contain inital values for:

@@ -109,9 +109,9 @@ * `q.concurrency`

## instance methods
### `q.start([cb])`
#### `q.start([cb])`
cb, if passed will be called when the queue empties
### `q.stop()`
#### `q.stop()`
stops the queue. can be resumed with `q.start()`
### `q.end([err])`
#### `q.end([err])`
stop and empty the queue immediately

@@ -121,20 +121,20 @@

Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
### `q.push(element1, ..., elementN)`
### `q.unshift(element1, ..., elementN)`
### `q.splice(index , howMany[, element1[, ...[, elementN]]])`
### `q.pop()`
### `q.shift()`
### `q.slice(begin[, end])`
### `q.reverse()`
### `q.indexOf(searchElement[, fromIndex])`
### `q.lastIndexOf(searchElement[, fromIndex])`
#### `q.push(element1, ..., elementN)`
#### `q.unshift(element1, ..., elementN)`
#### `q.splice(index , howMany[, element1[, ...[, elementN]]])`
#### `q.pop()`
#### `q.shift()`
#### `q.slice(begin[, end])`
#### `q.reverse()`
#### `q.indexOf(searchElement[, fromIndex])`
#### `q.lastIndexOf(searchElement[, fromIndex])`
## properties
### `q.concurrency`
#### `q.concurrency`
max number of jobs the queue should process concurrently, defaults to `Infinity`
### `q.timeout`
#### `q.timeout`
milliseconds to wait for a job to execute its callback
### `q.length`
#### `q.length`
jobs pending + jobs to process (readonly)

@@ -144,12 +144,12 @@

### `q.emit('success', result, job)`
#### `q.emit('success', result, job)`
after a job executes its callback
### `q.emit('error', err, job)`
#### `q.emit('error', err, job)`
after a job passes an error to its callback
### `q.emit('timeout', continue, job)`
#### `q.emit('timeout', continue, job)`
after `q.timeout` milliseconds have elapsed and a job has not executed its callback
### `q.emit('end'[, err])`
#### `q.emit('end'[, err])`
after all jobs have been processed

@@ -156,0 +156,0 @@

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