Skip to content

Commit

Permalink
Use eventemitter3 module instead of Node.js EventEmitter (#58)
Browse files Browse the repository at this point in the history
Fixes #55
  • Loading branch information
rexxars authored and sindresorhus committed Mar 8, 2019
1 parent cf653cb commit 3827527
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
@@ -1,6 +1,6 @@
'use strict';

const EventEmitter = require('events');
const EventEmitter = require('eventemitter3');

// Port of lower_bound from http://en.cppreference.com/w/cpp/algorithm/lower_bound
// Used to compute insertion index to keep queue sorted after insertion
Expand Down
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -37,6 +37,9 @@
"promises",
"bluebird"
],
"dependencies": {
"eventemitter3": "^3.1.0"
},
"devDependencies": {
"@types/node": "^11.9.6",
"ava": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -40,7 +40,7 @@ getUnicornTask().then(task => queue.add(task)).then(() => {

### PQueue([options])

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

#### options

Expand Down
2 changes: 1 addition & 1 deletion test.js
@@ -1,4 +1,4 @@
import EventEmitter from 'events';
import EventEmitter from 'eventemitter3';
import test from 'ava';
import delay from 'delay';
import inRange from 'in-range';
Expand Down

0 comments on commit 3827527

Please sign in to comment.