Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Use npm 'component-emitter' instead of 'events' #7

Closed
eddyystop opened this issue Jun 25, 2017 · 4 comments
Closed

Use npm 'component-emitter' instead of 'events' #7

eddyystop opened this issue Jun 25, 2017 · 4 comments

Comments

@eddyystop
Copy link
Member

eddyystop commented Jun 25, 2017

Because socket.io uses 'component-emitter'. 'events' has not been updated lately.

@daffl
Copy link
Contributor

daffl commented Jun 26, 2017

What is the difference? Should we consider this for other things as well?

@eddyystop
Copy link
Member Author

Gozala/events has 245 stars, hasn't been updated to the latest Node specs and the author doesn't work on it much.

component/emitter has 358 stars and is used by socket.io. There is no comment on Node compatibility.

I don't know what the differences are but I like the idea of using only one repo rather than several. I also think socket.io would have put more effort into choosing a repo.

I do think its better if Feathers uses one emitter repo and, since Feathers is dependant on socket.io in practice, we could use the one they do.

@daffl
Copy link
Contributor

daffl commented Jun 29, 2017

I agree. I looked briefly into it and it looks like it provider the .off method that the Node event emitter doesn't. I will try today to use it instead of the events package for v3 core and see if it breaks anything (I don't think it would though).

@eddyystop
Copy link
Member Author

I've switched to it in feathers-offline-*.

The only issue was I could not use it in class foo extends emitter. There a few es6 emitters but they have less than 20 stars.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants