src/client-registry.js
function removeListener(listener) {
  if (listener) {
    const index = listeners.indexOf(listener);
    if (index >= 0) listeners.splice(index, 1);
  } else {
    listeners.splice(0, listeners.length);
  }
}
function removeListener(listener) {
  if (listener) {
    const index = listeners.indexOf(listener);
    if (index >= 0) listeners.splice(index, 1);
  } else {
    listeners.splice(0, listeners.length);
  }
}
function removeListener ( listener ) { if ( listener ) { const index = listeners . indexOf ( listener ) ; if ( index >= 0 ) listeners . splice ( index , 1 ) ; } else { listeners . splice ( 0 , listeners . length ) ; } }
Remove a registered listener or all listeners.

If called with no arguments or null arguments, removes all listeners.
@method removeListener
@param {Function}
Remove a registered listener or all listeners .