index.js
function fire(event) {
		if (typeof event !== 'string') {
			throw new Error('"event" not a string');
		}

		// any listeners registered?
		if (!hasListeners(event)) {
			return triggerObject;
		}

		// get optional arguments
		var args = Array.prototype.slice.call(arguments, 1);

		// invoke listener functions
		listeners[event].slice(0).forEach(function(fn) {
			fn.apply(global, args);
		});

		return triggerObject;
	}
function fire(event) {
		if (typeof event !== 'string') {
			throw new Error('"event" not a string');
		}

		// any listeners registered?
		if (!hasListeners(event)) {
			return triggerObject;
		}

		// get optional arguments
		var args = Array.prototype.slice.call(arguments, 1);

		// invoke listener functions
		listeners[event].slice(0).forEach(function(fn) {
			fn.apply(global, args);
		});

		return triggerObject;
	}
function fire ( event ) { if ( typeof event !== 'string' ) { throw new Error ( '"event" not a string' ) ; } // any listeners registered? if ( ! hasListeners ( event ) ) { return triggerObject ; } // get optional arguments var args = Array . prototype . slice . call ( arguments , 1 ) ; // invoke listener functions listeners [ event ] . slice ( 0 ) . forEach ( function ( fn ) { fn . apply ( global , args ) ; } ) ; return triggerObject ; }
Fires an event.
@param {string} event the event to fire
@param {...*} arguments to pass to the event listeners
@returns {Object} this trigger object
Fires an event .