Skip to content

Normalize global $.emitter namespace

Compare
Choose a tag to compare
@cayasso cayasso released this 05 Nov 04:13
· 90 commits to master since this release

This release add some changes to normalize the emitter name space, the $ is used as a way to access the plugins namespaces directly, using the built-in primus.plugin('emitter') to obtain the plugin is a very handy alternative but if someone declare the plugin with a different name like primus.use('my-emitter', 'primus-emitter'), this will make the other plugins like primus-multiplex, primus-rooms fail to recognize it, so as a way to avoid this issue the $ is used, ensuring that we will always get the right plugin event if it was declared with a different name.

Cheers,
JB