index.js
function listen(pw, type, listener, fnm, rf, cbtype, passes) {
    var fn = function pulseListener(flow, artery, pulse) {
        if (!rf || !(artery instanceof cat.Artery) || !(pulse instanceof cat.Pulse) || flow instanceof Error)
            return arguments.length ? fn._callback.apply(pw, Array.prototype.slice.call(arguments)) : fn._callback.call(pw);
        var isRfCb = rf === 'callback', emitErrs = pulse.emitErrors || (pulse.emitErrors !== false && artery.emitErrors) || 
            (pulse.emitErrors !== false && artery.emitErrors !== false && pw.options && pw.options.emitErrors);
        var args = arguments.length > fn.length ?  Array.prototype.slice.call(arguments, isRfCb ? fn.length : 1) : null;
        if (isRfCb) {
            (args = args || []).push(function retrofitCb(err) { // last argument should be the callback function
                if (err instanceof Error) emitError(pw, err, pulse.type, [artery, pulse]); // emit any callback errors
                var pi = 0, al;
                if (passes) for (var pl = passes.length; pi < pl; ++pi) {
                    artery.passes[passes[pi]] = arguments[pi]; // pass by name before any other arguments are passed
                }
                if ((al = arguments.length - (pi += pi > 0)) === 1) artery.pass.push(arguments[pi]);
                else if (al) artery.pass.push.apply(artery.pass, Array.prototype.slice.call(arguments, pi));
            });
        }
        if (emitErrs) {
            try {
                args && args.length ? fn._callback.apply(pw, args) : fn._callback.call(pw, artery, pulse);
            } catch (e) {
                emitError(pw, e, pulse.type, [artery, pulse]);
            }
        } else args && args.length ? fn._callback.apply(pw, args) : fn._callback.call(pw, artery, pulse);
    };
    fn._callback = listener;
    if (cbtype) fn._cbtype = cbtype;
    return PulseEmitter.super_.prototype[fnm || 'addListener'].call(pw, type, fn);
}
function listen(pw, type, listener, fnm, rf, cbtype, passes) {
    var fn = function pulseListener(flow, artery, pulse) {
        if (!rf || !(artery instanceof cat.Artery) || !(pulse instanceof cat.Pulse) || flow instanceof Error)
            return arguments.length ? fn._callback.apply(pw, Array.prototype.slice.call(arguments)) : fn._callback.call(pw);
        var isRfCb = rf === 'callback', emitErrs = pulse.emitErrors || (pulse.emitErrors !== false && artery.emitErrors) || 
            (pulse.emitErrors !== false && artery.emitErrors !== false && pw.options && pw.options.emitErrors);
        var args = arguments.length > fn.length ?  Array.prototype.slice.call(arguments, isRfCb ? fn.length : 1) : null;
        if (isRfCb) {
            (args = args || []).push(function retrofitCb(err) { // last argument should be the callback function
                if (err instanceof Error) emitError(pw, err, pulse.type, [artery, pulse]); // emit any callback errors
                var pi = 0, al;
                if (passes) for (var pl = passes.length; pi < pl; ++pi) {
                    artery.passes[passes[pi]] = arguments[pi]; // pass by name before any other arguments are passed
                }
                if ((al = arguments.length - (pi += pi > 0)) === 1) artery.pass.push(arguments[pi]);
                else if (al) artery.pass.push.apply(artery.pass, Array.prototype.slice.call(arguments, pi));
            });
        }
        if (emitErrs) {
            try {
                args && args.length ? fn._callback.apply(pw, args) : fn._callback.call(pw, artery, pulse);
            } catch (e) {
                emitError(pw, e, pulse.type, [artery, pulse]);
            }
        } else args && args.length ? fn._callback.apply(pw, args) : fn._callback.call(pw, artery, pulse);
    };
    fn._callback = listener;
    if (cbtype) fn._cbtype = cbtype;
    return PulseEmitter.super_.prototype[fnm || 'addListener'].call(pw, type, fn);
}
function listen ( pw , type , listener , fnm , rf , cbtype , passes ) { var fn = function pulseListener ( flow , artery , pulse ) { if ( ! rf || ! ( artery instanceof cat . Artery ) || ! ( pulse instanceof cat . Pulse ) || flow instanceof Error ) return arguments . length ? fn . _callback . apply ( pw , Array . prototype . slice . call ( arguments ) ) : fn . _callback . call ( pw ) ; var isRfCb = rf === 'callback' , emitErrs = pulse . emitErrors || ( pulse . emitErrors !== false && artery . emitErrors ) || ( pulse . emitErrors !== false && artery . emitErrors !== false && pw . options && pw . options . emitErrors ) ; var args = arguments . length > fn . length ? Array . prototype . slice . call ( arguments , isRfCb ? fn . length : 1 ) : null ; if ( isRfCb ) { ( args = args || [ ] ) . push ( function retrofitCb ( err ) { // last argument should be the callback function if ( err instanceof Error ) emitError ( pw , err , pulse . type , [ artery , pulse ] ) ; // emit any callback errors var pi = 0 , al ; if ( passes ) for ( var pl = passes . length ; pi < pl ; ++ pi ) { artery . passes [ passes [ pi ] ] = arguments [ pi ] ; // pass by name before any other arguments are passed } if ( ( al = arguments . length - ( pi += pi > 0 ) ) === 1 ) artery . pass . push ( arguments [ pi ] ) ; else if ( al ) artery . pass . push . apply ( artery . pass , Array . prototype . slice . call ( arguments , pi ) ) ; } ) ; } if ( emitErrs ) { try { args && args . length ? fn . _callback . apply ( pw , args ) : fn . _callback . call ( pw , artery , pulse ) ; } catch ( e ) { emitError ( pw , e , pulse . type , [ artery , pulse ] ) ; } } else args && args . length ? fn . _callback . apply ( pw , args ) : fn . _callback . call ( pw , artery , pulse ) ; } ; fn . _callback = listener ; if ( cbtype ) fn . _cbtype = cbtype ; return PulseEmitter . super_ . prototype [ fnm || 'addListener' ] . call ( pw , type , fn ) ; }
Listens for incoming events using event emitter's add listener function, but with optional error handling and pulse event only capabilities

@private
@arg {PulseEmitter} pw the pulse emitter
@arg {String} type the event type
@arg {function} listener the function to execute when the event type is emitted
@arg {String} [fnm=addListener] the optional function name that will be called on the pulse emitter
@arg {(String | Boolean)} [rf] a flag that indicates a pattern to mimic (e.g. "callback" would pass in pending arguments to the listener with an auto-generated callback function
as the last argument and would pass the callback results into the next waiting listeners in the chain; if the first argument is an Error it will emit/throw
accordingly)
@arg {Array} [passes] an array of names that will automatically be set on the auto-generated callback's artery.passes by name in order and preceeding any arguments in artery.pass
@returns {PulseEmitter} the pulse emitter
Listens for incoming events using event emitter s add listener function but with optional error handling and pulse event only capabilities