Informer.prototype.on >= 0.1.3

Purpose

Add an event listener

Syntax

Informer#on ( Stringtype Functionlistener Objectcontext );

Parameters

type
listener
context

Examples

Add a simple event listener

var instance = new Informer();

instance.on('test', function onTest(data) {
    console.log(data);
    >>> "my-message"
});

instance.emit('test', 'my-message');