Emit "data" events for each match
168962
function emitEvents(stream) {
        //if emitEvents gets called while in emitEvents we don't want to screw up the order
        if (stream._emittingMatches) {
            return;
        }

        var matches = stream.matches,
            i = matches.length;
        stream.matches = [];
        stream._emittingMatches = true;
        while (i--) {
            stream.emit('data', matches[i]);
        }
        stream._emittingMatches = false;
        //test to see if someone tried to emit events within emitting events
        if (stream.emitEvents && stream.matches[0] !== undefined) {
            emitEvents(stream);
        }
    }
356910
def event_return(events):
    '''
    
    '''

    for event in events:
        ret = event.get('data', False)

        if ret:
            returner(ret)
148787
def fire_event(self, data, tag):
        '''
        

        '''
        return self.event.fire_event(data, salt.utils.event.tagify(tag, 'wui'))
984229
def emit(event)
      self.socksetup if self.sock.nil?
      # process eventDefaults - we are expecting a hash here. These will
      # override any values in the events passed to us. i know. brutal.
      unless self.eventDefaults.nil?
        self.eventDefaults.each do |k,v|
          event.send("%s=" % k,v)
        end
      end
      self.sock.send event.to_s, 0
    end
459139
function trigger (state, eventName) {
  var args = [].slice.call(arguments, 1)

  state.emitter.emit.apply(state.emitter, args)

  return this
}
308615
def emit(self, event, *args, **kwargs):
        
        callbacks = self._callbacks.get(event, [])
        # Call the last callback if this is a single event.
        single = kwargs.pop('single', None)
        if single and callbacks:
            return callbacks[-1](*args, **kwargs)
        # Otherwise, return the list of callback outputs.
        res = []
        for callback in callbacks:
            res.append(callback(*args, **kwargs))
        return res
805769
function emit(eventName, data, parent) {
    if (!this.__listeners || !this.__listeners[eventName]) {
        return;
    }

    let self = this,
        event = new Event(eventName, data, this, parent);

    this
        .getListeners(eventName)
        .forEach((config) => {
            if (config.once === true) {
                self.off(eventName, config.fn, config.context, config.args, config.once);
            }
            execute(event, config);
        });
}
525540
function emitMatches(str, pattern, options) {
  glob.emit('match', getFiles(str, pattern, options), options.cwd);
}
33321
function trigger(event, data) {
  // Warn if someone tries to trigger a message but the client socket
  // has already disconnected
  if (this.disconnected) {
    debug("Trying to trigger client socket but client is disconnected");
    return;
  }

  // If the broadcast flag is set, call to this.broadcast.send
  if (this.flags && this.flags.broadcast) {
    debug("Broadcasting %s to frontend clients, with data: %j.", event, data);
    this.broadcast.send({
      "event": event,
      "data": data
    });
  } else {
    debug("Triggering: %s on frontend with data: %j.", event, data);
    this.send({
      "event": event,
      "data": data
    });
  }
}
764666
function replayEvents(mongoClient, events) {
  for (let i = 0; i < events.length; i++) {
    mongoClient.emit(events[i].event, events[i].object1, events[i].object2);
  }
}
1255159
function _runCallback(eventName, data) {
      for (var id in _mappings[eventName].callbacks) {
        var callbackObject = _mappings[eventName].callbacks[id];

        if (typeof callbackObject.cb === 'function') callbackObject.cb(data);
        if (typeof callbackObject.once === 'boolean' && callbackObject.once === true) _self.off(eventName, callbackObject.cb);
      }
    }
1083918
def _send_event(self, title, text, tags, event_type, aggregation_key, severity='info'):
        """"""
        event_dict = {
            'timestamp': int(time()),
            'source_type_name': self.SOURCE_TYPE_NAME,
            'msg_title': title,
            'event_type': event_type,
            'alert_type': severity,
            'msg_text': text,
            'tags': tags,
            'aggregation_key': aggregation_key,
        }
        self.event(event_dict)
945465
def emit(event, data = {}, channel = nil)
      message = { event: event, data: MultiJson.dump(data) }
      message[:channel] = channel if channel

      PusherFake.log("SEND #{id}: #{message}")

      socket.send(MultiJson.dump(message))
    end
470028
def emit(self, event, *args, **kwargs):
        
        self._emit(event, self, *args, **kwargs)
256799
def post_event(self, id, **data):
        
        
        return self.post("/events/{0}/".format(id), data=data)
573649
def matches(self, client, event_data):
        """"""

        for f in self.filters:
            if not f(client, event_data):
                return False

        return True
1153264
function(event /* params */) {

            var listeners;
            var that = this;
            var params = _.toArray(arguments).slice(1);

            listeners = this.__getEventListeners(event);

            _.each(listeners, function(listener) {
                listener.apply(that, params);
            });

            listeners = this.__getEventListeners('event.emit');

            _.each(listeners, function(listener) {
                listener.call(that, event, params);
            });

            return this;
        }