src/nopg.js
function remove_listener(event/*, listener*/) {

			// Ignore if not tcn event
			if(NoPg.isLocalEventName(event)) {
				return;
			}

			event = NoPg.parseEventName(event);

			// Stringifying back the event normalizes the original event name
			var event_name = NoPg.stringifyEventName(event);

			var channel_name = NoPg.parseTCNChannelName(event);

			counter[event_name] -= 1;
			if(counter[event_name] === 0) {
				//debug.log('Stopped listening channel ' + channel_name + ' for ' + event_name);
				self._db.removeListener(channel_name, tcn_listeners[event_name]);
				delete counter[event_name];
			}

		}
function remove_listener(event/*, listener*/) {

			// Ignore if not tcn event
			if(NoPg.isLocalEventName(event)) {
				return;
			}

			event = NoPg.parseEventName(event);

			// Stringifying back the event normalizes the original event name
			var event_name = NoPg.stringifyEventName(event);

			var channel_name = NoPg.parseTCNChannelName(event);

			counter[event_name] -= 1;
			if(counter[event_name] === 0) {
				//debug.log('Stopped listening channel ' + channel_name + ' for ' + event_name);
				self._db.removeListener(channel_name, tcn_listeners[event_name]);
				delete counter[event_name];
			}

		}
function remove_listener ( event /*, listener*/ ) { // Ignore if not tcn event if ( NoPg . isLocalEventName ( event ) ) { return ; } event = NoPg . parseEventName ( event ) ; // Stringifying back the event normalizes the original event name var event_name = NoPg . stringifyEventName ( event ) ; var channel_name = NoPg . parseTCNChannelName ( event ) ; counter [ event_name ] -= 1 ; if ( counter [ event_name ] === 0 ) { //debug.log('Stopped listening channel ' + channel_name + ' for ' + event_name); self . _db . removeListener ( channel_name , tcn_listeners [ event_name ] ) ; delete counter [ event_name ] ; } }
Listener for removing listeners
Listener for removing listeners