Skip to content

v3.1.0

Compare
Choose a tag to compare
@goto-bus-stop goto-bus-stop released this 08 Jan 15:42
4f03fbf

events now matches the Node.js 11.12.0 API.

  • pass through return value in wrapped emitter.once() listeners

    Now, this works:

    emitter.once('myevent', function () { return 1; });
    var listener = emitter.rawListeners('myevent')[0]
    assert(listener() === 1);

    Previously, listener() would return undefined regardless of the implementation.

    Ported from nodejs/node@acc506c

  • Reduce code duplication in listener type check (#67 by @friederbluemle).

  • Improve emitter.once() performance in some engines