src/libs/Bus.js
function unsubscribe(oSubscriber) {
  let nUnsubscribed = 0;
  const oEventsCallbacks = oSubscriber.events;
  if (!oSubscriber || oEventsCallbacks === und) {
    return false;
  }
  iterateObject(oEventsCallbacks, function (oItem, sChannelId) {
    if (oChannels[sChannelId] === und) {
      oChannels[sChannelId] = {};
    }
    nUnsubscribed = _removeSubscribersPerEvent(oItem, sChannelId, oSubscriber);
  });

  return nUnsubscribed > 0;
}
function unsubscribe(oSubscriber) {
  let nUnsubscribed = 0;
  const oEventsCallbacks = oSubscriber.events;
  if (!oSubscriber || oEventsCallbacks === und) {
    return false;
  }
  iterateObject(oEventsCallbacks, function (oItem, sChannelId) {
    if (oChannels[sChannelId] === und) {
      oChannels[sChannelId] = {};
    }
    nUnsubscribed = _removeSubscribersPerEvent(oItem, sChannelId, oSubscriber);
  });

  return nUnsubscribed > 0;
}
function unsubscribe ( oSubscriber ) { let nUnsubscribed = 0 ; const oEventsCallbacks = oSubscriber . events ; if ( ! oSubscriber || oEventsCallbacks === und ) { return false ; } iterateObject ( oEventsCallbacks , function ( oItem , sChannelId ) { if ( oChannels [ sChannelId ] === und ) { oChannels [ sChannelId ] = { } ; } nUnsubscribed = _removeSubscribersPerEvent ( oItem , sChannelId , oSubscriber ) ; } ) ; return nUnsubscribed > 0 ; }
unsubscribe gets the oEventsCallbacks methods and removes the handlers of the channel.
@param {Object} oSubscriber
@return {Boolean}
unsubscribe gets the oEventsCallbacks methods and removes the handlers of the channel .