util/EventEmitter.js
function _disconnect (context) {
  /* eslint-disable no-invalid-this */
  // Remove all connections to the context
  forEach(this.__events__, (bindings, event) => {
    for (let i = bindings.length - 1; i >= 0; i--) {
      // bindings[i] may have been removed by the previous steps
      // so check it still exists
      if (bindings[i] && bindings[i].context === context) {
        _off.call(this, event, bindings[i].method, context)
      }
    }
  })
  return this
  /* eslint-enable no-invalid-this */
}
function _disconnect (context) {
  /* eslint-disable no-invalid-this */
  // Remove all connections to the context
  forEach(this.__events__, (bindings, event) => {
    for (let i = bindings.length - 1; i >= 0; i--) {
      // bindings[i] may have been removed by the previous steps
      // so check it still exists
      if (bindings[i] && bindings[i].context === context) {
        _off.call(this, event, bindings[i].method, context)
      }
    }
  })
  return this
  /* eslint-enable no-invalid-this */
}
function _disconnect ( context ) { /* eslint-disable no-invalid-this */ // Remove all connections to the context forEach ( this . __events__ , ( bindings , event ) => { for ( let i = bindings . length - 1 ; i >= 0 ; i -- ) { // bindings[i] may have been removed by the previous steps // so check it still exists if ( bindings [ i ] && bindings [ i ] . context === context ) { _off . call ( this , event , bindings [ i ] . method , context ) } } } ) return this /* eslint-enable no-invalid-this */ }
removes a listener from all events
removes a listener from all events