SubscriptionMap.prototype.unsubscribe = function()

in src/core/eventbus.js [48:64]


SubscriptionMap.prototype.unsubscribe = function(eventName, subId) {
  if (Utils.contains(this.subEventNameMap, eventName)) {
    this.subEventNameMap[eventName] = this.subEventNameMap[eventName].filter(
      function(s) {
        return s.id !== subId;
      }
    );

    if (this.subEventNameMap[eventName].length < 1) {
      delete this.subEventNameMap[eventName];
    }
  }

  if (Utils.contains(this.subIdMap, subId)) {
    delete this.subIdMap[subId];
  }
};