src/index.js
function (name, fn, ctx) {
        assert(isString(name), 'EventEmitter#on: name is not a string');
        assert(isFunction(fn), 'EventEmitter#on: fn is not a function');

        // If the context is not passed, use `this`.
        ctx = ctx || this;

        // Push to private lists of listeners.
        this._listeners.push({
            name: name,
            fn: fn,
            ctx: ctx
        });

        return this;
    }
function (name, fn, ctx) {
        assert(isString(name), 'EventEmitter#on: name is not a string');
        assert(isFunction(fn), 'EventEmitter#on: fn is not a function');

        // If the context is not passed, use `this`.
        ctx = ctx || this;

        // Push to private lists of listeners.
        this._listeners.push({
            name: name,
            fn: fn,
            ctx: ctx
        });

        return this;
    }
function ( name , fn , ctx ) { assert ( isString ( name ) , 'EventEmitter#on: name is not a string' ) ; assert ( isFunction ( fn ) , 'EventEmitter#on: fn is not a function' ) ; // If the context is not passed, use `this`. ctx = ctx || this ; // Push to private lists of listeners. this . _listeners . push ( { name : name , fn : fn , ctx : ctx } ) ; return this ; }
Register listener on concrete name with specified handler.

@param {string} name
@param {Function} fn
@param {Object} [ctx]
Register listener on concrete name with specified handler .