TooTallNate / keypress

Make any Node ReadableStream emit "keypress" events
358 stars 60 forks source link

api: provide an api `.fire()` to remove related event from stream #9

Closed yorkie closed 9 years ago

yorkie commented 10 years ago

See the title of this PR, I did:

1. add .fire()

this call removeListener() to our onData/onNewListener functions for user, and if user has a specific call to enableMouse, it would call disableMouse().

2. remove some unnecessary calls at user-land

for example: user don't need write this:

process.on('exit', function() {
  keypress.disableMouse();
});

All what I did just fix some memory leaks on EventEmitter. PS: This module is very awesome, thank you so much :)

yorkie commented 10 years ago

ping @TooTallNate, LGTY?

yorkie commented 10 years ago

still ping @TooTallNate, this may be important for me, thanks

yorkie commented 9 years ago

Sorry, I have to close this one because I'm in a routine to clean up these still opened and dead pr.