Skip to content

PascalPflaum/uberPublisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published