Skip to content

Replacing emit with send

Compare
Choose a tag to compare
@cayasso cayasso released this 01 Nov 22:56
· 94 commits to master since this release

As off version 2+ the emit method will no longer be supported, instead use the send method, this is because emit is widely used by Primus for internal events, so this required some hacks and also an event blacklist to maintain for avoiding event collisions, for the sake of simplicity and the sake of maintainability I decided to drop the method, the new method send works the same as emit, and it removes hacks and the old event blacklist to support.

Because of this change, primus-emitter 2.0 might not work well with versions 1.x of primus-rooms and primus-multiplex, these modules will be updated to 2.x version making them also compatible with this version.

You can always go back and install the previous version if you really need to.

$ npm install primus-emitter@1.1.0