Socket
Socket
Sign inDemoInstall

queue-promise

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queue-promise - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

3

package.json
{
"name": "queue-promise",
"version": "0.1.0",
"version": "0.1.1",
"keywords": [

@@ -32,3 +32,2 @@ "queue",

"scripts": {
"test": "mocha",
"clean": "rm -rf dist",

@@ -35,0 +34,0 @@ "build": "babel src -d dist",

@@ -29,3 +29,3 @@ <div align="center">

q.on( "resolve", ...data => console.log( data ) );
q.on( "resolve", data => console.log( data ) );
q.on( "reject", error => console.error( error ) );

@@ -42,3 +42,3 @@

#### new Queue( options )
#### `new Queue( options )`

@@ -52,32 +52,20 @@ Create a new `Queue` instance with optionally injected options.

#### **public** .add( promise )
#### **public** `.add( promise )`
Adds a promise to the queue.
#### **public** .start()
#### **public** `.start()`
Starts the queue.
#### **public** .stop()
#### **public** `.stop()`
Stops the queue.
#### **private** .next()
#### **private** `.next()`
Goes to the next request and stops the loop if there is no requests left.
#### **public** .on( event, callback )
#### **public** `.on( event, callback )`
Sets a `callback` for an `event`. You can set callback for those events:
- `start`
- `stop`
- `tick`
- `resolve[ ...output ]`
- `reject[ message ]`
- `end`
## Tests
```bash
$ npm test
```
Sets a `callback` for an `event`. You can set callback for those events: `start`, `stop`, `tick`, `resolve`, `reject`, `end`.

Sorry, the diff of this file is not supported yet

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