src/index.js
function (name, params) {
        assert(isString(name), 'EventEmitter#emit: name is not a string');

        forEach(this._listeners, function (event) {
            if (event.name === name) {
                event.fn.call(event.ctx, params);
            }

            // Special behaviour for wildcard - invoke each event handler.
            var isWildcard = (/^all|\*$/).test(event.name);

            if (isWildcard) {
                event.fn.call(event.ctx, name, params);
            }
        });

        return this;
    }
function (name, params) {
        assert(isString(name), 'EventEmitter#emit: name is not a string');

        forEach(this._listeners, function (event) {
            if (event.name === name) {
                event.fn.call(event.ctx, params);
            }

            // Special behaviour for wildcard - invoke each event handler.
            var isWildcard = (/^all|\*$/).test(event.name);

            if (isWildcard) {
                event.fn.call(event.ctx, name, params);
            }
        });

        return this;
    }
function ( name , params ) { assert ( isString ( name ) , 'EventEmitter#emit: name is not a string' ) ; forEach ( this . _listeners , function ( event ) { if ( event . name === name ) { event . fn . call ( event . ctx , params ) ; } // Special behaviour for wildcard - invoke each event handler. var isWildcard = ( / ^all|\*$ / ) . test ( event . name ) ; if ( isWildcard ) { event . fn . call ( event . ctx , name , params ) ; } } ) ; return this ; }
Trigger event.
All of listeners waiting for emit event will be executed.

@param {string} name
@param {Object} [params]
Trigger event . All of listeners waiting for emit event will be executed .