lib/catheter.js
function inlet(pw, iv, drip) {
    var ib = drip ? drip.pulse.inbound : iv.inbound;
    if (!ib) return true;
    var tgs = ib.selector && typeof iv.target.querySelectorAll === 'function' ? iv.target.querySelectorAll(ib.selector) : [iv.target];
    var ttl = tgs.length;
    var fn = function inboundListener() {
        if (arguments.length) iv.pass.push.apply(iv.pass, arguments);
        if (++ib.count >= ib.repeat) {
            plet.event(ib.event, tgs, fn, ib.useCapture, true); // remove listener
            if (drip) drip.emit(pw, iv, true);
            // TODO : no drip should continue i.v. emission
        }
    };
    plet.event(ib.event, tgs, fn, ib.useCapture);
}
function inlet(pw, iv, drip) {
    var ib = drip ? drip.pulse.inbound : iv.inbound;
    if (!ib) return true;
    var tgs = ib.selector && typeof iv.target.querySelectorAll === 'function' ? iv.target.querySelectorAll(ib.selector) : [iv.target];
    var ttl = tgs.length;
    var fn = function inboundListener() {
        if (arguments.length) iv.pass.push.apply(iv.pass, arguments);
        if (++ib.count >= ib.repeat) {
            plet.event(ib.event, tgs, fn, ib.useCapture, true); // remove listener
            if (drip) drip.emit(pw, iv, true);
            // TODO : no drip should continue i.v. emission
        }
    };
    plet.event(ib.event, tgs, fn, ib.useCapture);
}
function inlet ( pw , iv , drip ) { var ib = drip ? drip . pulse . inbound : iv . inbound ; if ( ! ib ) return true ; var tgs = ib . selector && typeof iv . target . querySelectorAll === 'function' ? iv . target . querySelectorAll ( ib . selector ) : [ iv . target ] ; var ttl = tgs . length ; var fn = function inboundListener ( ) { if ( arguments . length ) iv . pass . push . apply ( iv . pass , arguments ) ; if ( ++ ib . count >= ib . repeat ) { plet . event ( ib . event , tgs , fn , ib . useCapture , true ) ; // remove listener if ( drip ) drip . emit ( pw , iv , true ) ; // TODO : no drip should continue i.v. emission } } ; plet . event ( ib . event , tgs , fn , ib . useCapture ) ; }
Universal inlet for inbound event deferment

@arg {PulseEmitter} pw the pulse emitter
@arg {Array} iv the I.V. catheter
@arg {Drip} [drip] the drip to check/process the inbound deferment (omit to check/process the I.V. instead)
Universal inlet for inbound event deferment