emitter.js
function( type ) {

      if( arguments.length === 0 ) {
        for( type in this._events ) {
          this.removeAllListeners( type )
        }
      } else {
        this._events[ type ] = undefined
        delete this._events[ type ]
      }

      return this

    }
function( type ) {

      if( arguments.length === 0 ) {
        for( type in this._events ) {
          this.removeAllListeners( type )
        }
      } else {
        this._events[ type ] = undefined
        delete this._events[ type ]
      }

      return this

    }
function ( type ) { if ( arguments . length === 0 ) { for ( type in this . _events ) { this . removeAllListeners ( type ) } } else { this . _events [ type ] = undefined delete this . _events [ type ] } return this }
Removes all listeners,
or those of the specified event
@param  {String}  type
@return {Emitter}
Removes all listeners or those of the specified event