src/xDispatcher.js
function( id, callback ){
		var ID = id;

		// If the callback is the first parameter
		if( typeof id == 'function' ){
			ID = 'ID_' + this._ID;
			callback = id;
		}

		this._callbacks[ID] = callback;
		this._ID++;

		return ID;
	}
function( id, callback ){
		var ID = id;

		// If the callback is the first parameter
		if( typeof id == 'function' ){
			ID = 'ID_' + this._ID;
			callback = id;
		}

		this._callbacks[ID] = callback;
		this._ID++;

		return ID;
	}
function ( id , callback ) { var ID = id ; // If the callback is the first parameter if ( typeof id == 'function' ) { ID = 'ID_' + this . _ID ; callback = id ; } this . _callbacks [ ID ] = callback ; this . _ID ++ ; return ID ; }
Register a callback that will be called when an action is dispatched.

@param  {String | Function}   id  If a string is passed, it will be the id of the callback.
If a function is passed, it will be used as callback, and id is generated
automatically.
@param  {Function} callback If an id is passed as a first argument, this will be the callback.
@return {String}            The id of the callback to be used with the waitFor method.
Register a callback that will be called when an action is dispatched .