Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SYNOPSIS

uber.publisher is an extended version of the EventEmitter module you can find in Node.js. It supports wildcards, namespaces and multi event emitting

DESCRIPTION

FEATURES

  • Namespaces
  • Wildcards
  • Once

Differences

  • uber.publisher constructor takes an optional object. This object will be extended with the publisher functionality. If no object is given, a new one will be returned.
    var Publisher = require('uber.publisher');
    var instance = new MyOwnConstructor();
    var publisher = new Publisher(instance);
  • Namespaces are passed as seperate strings during subscribing and calles as array during emit
   publisher.on('top', 'tierA', 'tierB', 'bottom', function(text) {
      console.log('text');
    });
   publisher.emit(['top', 'tierA', 'tierB', 'bottom'], 'hello', 'more payload');

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages