queue-promise
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
14574
9
303
69