andrewjstone / measure

Simple measuring of your javascript operations for node.js
4 stars 1 forks source link

EventEmitter2 reference incorrect #1

Closed kmalakoff closed 8 years ago

kmalakoff commented 8 years ago

it looks like this isn't right....

var EventEmitter = require('eventemitter2').EventEmitter2;

Should be:

var EventEmitter = require('eventemitter2');
andrewjstone commented 8 years ago

I haven't touched this code in 4 years, so it's possible that the EventEmitter2 interface has changed in the intervening time. However, I just installed and ran the tests and they still pass, so this seems to work fine.

andrewjstone commented 8 years ago

Interface looks the same according to EventEmitter2 docs.

kmalakoff commented 8 years ago

Thanks for checking. I should have checked the source: https://github.com/asyncly/EventEmitter2/blob/master/lib/eventemitter2.js#L584

Strange it crashed the first time I ran it so I needed to make the change I'll investigate further...maybe it is a webpack thing.

kmalakoff commented 8 years ago

It was a known bug: https://github.com/asyncly/EventEmitter2/issues/146.

I've submitted a pull request: https://github.com/asyncly/EventEmitter2/pull/156