Module: lib/Mediator

lib/Mediator

new require("lib/Mediator")()

Implements mediator pattern
Source:
A module representing Mediator
Source:

Methods

<inner> define(factory)

Override AMD `define` function for RequireJS
Parameters:
Name Type Description
factory function
Source:

<inner> publish(channel)

Publish to a given channel Example: mediator.publish( channel, sniff, errorCode, range, loc, payload )
Parameters:
Name Type Description
channel string
Source:

<inner> subscribe(channel, fn)

Subscribe to a given channel
Parameters:
Name Type Description
channel string
fn function
Source: