This repository has been archived by the owner. It is now read-only.

I comitted a small fix to the EventEmitter code, please consider merging it. #500

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@theosp

theosp commented Dec 7, 2010

Thank you for your great project by the way... :)

Bugfix: EventEmitter.prototype.once should "return this;"
This fix makes it possible to do the following::

    EventEmitter = require('events').EventEmitter;

    e = new EventEmitter();

    e.once('a', function () {})
     .on('a', function () {});

Like it is possible to do::

    EventEmitter = require('events').EventEmitter;

    e = new EventEmitter();

    e.on('a', function () {})
     .on('b', function () {})
     .removeListener('a', function () {})
     .removeAllListeners('b');
@aconbere

This comment has been minimized.

Show comment
Hide comment
@aconbere

aconbere Dec 7, 2010

+1 seems straight forward and consistent with the rest of the EventEmitter design

aconbere commented Dec 7, 2010

+1 seems straight forward and consistent with the rest of the EventEmitter design

@theosp

This comment has been minimized.

Show comment
Hide comment
@theosp

theosp Dec 15, 2010

Will it be merged?

If you've decided to leave it out, it'd be nice to know the reason.

Thanks

theosp commented Dec 15, 2010

Will it be merged?

If you've decided to leave it out, it'd be nice to know the reason.

Thanks

@aconbere

This comment has been minimized.

Show comment
Hide comment
@aconbere

aconbere Dec 15, 2010

Here are some tips for championing a patch.

First, send an email to the node Dec mailing list with the commit as a patch in an attachment.

Second, find ry in irc.

Third, keep trying.

I feel like ry might be a bit busy lately so the forth is patience.

Here are some tips for championing a patch.

First, send an email to the node Dec mailing list with the commit as a patch in an attachment.

Second, find ry in irc.

Third, keep trying.

I feel like ry might be a bit busy lately so the forth is patience.

@theosp

This comment has been minimized.

Show comment
Hide comment

theosp commented Dec 16, 2010

Thanks

@theosp

This comment has been minimized.

Show comment
Hide comment
@theosp

theosp Dec 28, 2010

aconbere: it is definitely requires some work, I had to find one of nodejs-dev moderators on irc just to get the email I've sent to be published :)

theosp commented Dec 28, 2010

aconbere: it is definitely requires some work, I had to find one of nodejs-dev moderators on irc just to get the email I've sent to be published :)

@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Dec 31, 2010

thank you. sorry fro the delay. applied in ca8cc71

ry commented Dec 31, 2010

thank you. sorry fro the delay. applied in ca8cc71

This issue was closed.

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