Skip to content

Commit

Permalink
Readme tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 5, 2019
1 parent ed606e8 commit aba683c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- '12'
- '10'
- '8'
after_success:
Expand Down
15 changes: 5 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ npm install p-queue
Here we run only one promise at the time. For example, set `concurrency` to 4 to run four promises at the same time.

```js
const PQueue = require('p-queue');
const {default: PQueue} = require('p-queue');
const got = require('got');

const queue = new PQueue({concurrency: 1});
Expand All @@ -42,13 +42,13 @@ const queue = new PQueue({concurrency: 1});

## API

### PQueue([options])
### PQueue(options?)

Returns a new `queue` instance, which is an [`EventEmitter3`](https://github.com/primus/eventemitter3) subclass.

#### options

Type: `Object`
Type: `object`

##### concurrency

Expand Down Expand Up @@ -183,7 +183,7 @@ Emitted as each item is processed in the queue for the purpose of tracking progr

```js
const delay = require('delay');
const PQueue = require('p-queue');
const {default: PQueue} = require('p-queue');

const queue = new PQueue({concurrency: 2});

Expand All @@ -206,7 +206,7 @@ A more advanced example to help you understand the flow.

```js
const delay = require('delay');
const PQueue = require('p-queue');
const {default: PQueue} = require('p-queue');

const queue = new PQueue({concurrency: 1});

Expand Down Expand Up @@ -302,8 +302,3 @@ class QueueClass {
- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions
- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
- [More…](https://github.com/sindresorhus/promise-fun)


## License

MIT

0 comments on commit aba683c

Please sign in to comment.