Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Wildcard should be triggered when upper ns is triggered #3

Open
avetisk opened this issue May 20, 2014 · 0 comments
Open

Wildcard should be triggered when upper ns is triggered #3

avetisk opened this issue May 20, 2014 · 0 comments
Assignees

Comments

@avetisk
Copy link
Owner

avetisk commented May 20, 2014

This won't work:

var ee = new EventEmitter();

ee.on('ns.*', function () {
  console.log('EPIC WIN');
});
ee.emit('ns');

Nothing will be logged.

This should be available at least as an option:

var ee = new EventEmitter({widewildcard': true});

ee.on('ns.*', function () {
  console.log('EPIC WIN');
});
ee.emit('ns'); //-> EPIC WIN
@avetisk avetisk self-assigned this May 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant