question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nanobus#listeners should always include star listeners

See original GitHub issue

The Nanobus#listeners function doesn’t include star listeners when I request the listeners for an event name.

For example, I would expect that if I add a star listener to the bus, then it should be included when I request the listeners for any event. Technically there is a listener on the bus, it’s just not waiting for a specific event name.

bus.on('*', function (a) { ... })
bus.on('foo', function (a) { ... })
bus.listeners('foo') // [function, function]
bus.listeners('bar') // [function]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mjstahlcommented, Oct 11, 2018

This is resolved with the merging of PR https://github.com/choojs/nanobus/pull/33

1reaction
mjstahlcommented, Jul 17, 2018

Judging by the listeners function you could just do bus.listeners('*').

But what I do agree about is that the README should include language specifying that * events are not included in listeners or removed when removeAllListeners is called with an eventName other than '*'.

Read more comments on GitHub >

github_iconTop Results From Across the Web

State-of-the-Art - Small Spacecraft Technology - NASA
always have a need to be qualified for harsh environments from a temperature perspective, as well as other factors that are a part...
Read more >
Linda G (@BlueEydGlambert) / Twitter
Artist · 54.4M monthly listeners.
Read more >
'A SURVEY OF PARALLEL COMPUTING - DTIC
This effort provided a very thorough view of many of the software engineering problems that are currently associated with the utilization of non-von...
Read more >
TEST alliance announces shield cap doctrine : r/Eve - Reddit
We've always considered the cap fleet as our main driver behind POS and sov mechanics. By-and-large the DPS will remain constant on both...
Read more >
Meet Your IMPACTS Scientists | NC Science Festival
"Strong and respectful science communication will be pivotal in driving the ... "I have always loved science, but have also been proficient in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found