index.js
function detach(context) {
	/*jshint validthis: true */
	if (DEBUG_DISPATCHER) log.info('DETACHED.');
	if (!context) {
		return;
	}
	if (!attached(context)) {
		return;
	}

	context.dispatcher._client.quit();
	context.dispatcher._client.dispatcher = null;
	context.dispatcher = null;

	return this;
}
function detach(context) {
	/*jshint validthis: true */
	if (DEBUG_DISPATCHER) log.info('DETACHED.');
	if (!context) {
		return;
	}
	if (!attached(context)) {
		return;
	}

	context.dispatcher._client.quit();
	context.dispatcher._client.dispatcher = null;
	context.dispatcher = null;

	return this;
}
function detach ( context ) { /*jshint validthis: true */ if ( DEBUG_DISPATCHER ) log . info ( 'DETACHED.' ) ; if ( ! context ) { return ; } if ( ! attached ( context ) ) { return ; } context . dispatcher . _client . quit ( ) ; context . dispatcher . _client . dispatcher = null ; context . dispatcher = null ; return this ; }
Detaches the dispatcher from a particular context, remove the "dispatcher" namespace from it and stopping all subscriptions.
@param context The object passed to the "attach" call.
@returns {*} The dispatcher, for fluent calls.
Detaches the dispatcher from a particular context remove the dispatcher namespace from it and stopping all subscriptions .