lib/pipe.js
function (chain) {
        if (chain.readable) {
            chain.chainAfter = chain.chainAfter || Pipe.Chain.prototype.chainAfter;
            chain.nextChain = chain.nextChain || Pipe.Chain.prototype.nextChain;
        }
        if (chain.writable) { // Duplex
            chain.chainBefore = chain.chainBefore || Pipe.Chain.prototype.chainBefore;
            chain.previousChain = chain.previousChain || Pipe.Chain.prototype.previousChain;
        }

        chain.autoEnhance = true;

        chain.enhanceForeignStream = chain.enhanceForeignStream || Pipe.Chain.prototype.enhanceForeignStream;

    }
function (chain) {
        if (chain.readable) {
            chain.chainAfter = chain.chainAfter || Pipe.Chain.prototype.chainAfter;
            chain.nextChain = chain.nextChain || Pipe.Chain.prototype.nextChain;
        }
        if (chain.writable) { // Duplex
            chain.chainBefore = chain.chainBefore || Pipe.Chain.prototype.chainBefore;
            chain.previousChain = chain.previousChain || Pipe.Chain.prototype.previousChain;
        }

        chain.autoEnhance = true;

        chain.enhanceForeignStream = chain.enhanceForeignStream || Pipe.Chain.prototype.enhanceForeignStream;

    }
function ( chain ) { if ( chain . readable ) { chain . chainAfter = chain . chainAfter || Pipe . Chain . prototype . chainAfter ; chain . nextChain = chain . nextChain || Pipe . Chain . prototype . nextChain ; } if ( chain . writable ) { // Duplex chain . chainBefore = chain . chainBefore || Pipe . Chain . prototype . chainBefore ; chain . previousChain = chain . previousChain || Pipe . Chain . prototype . previousChain ; } chain . autoEnhance = true ; chain . enhanceForeignStream = chain . enhanceForeignStream || Pipe . Chain . prototype . enhanceForeignStream ; }
Enhance a stream to a chainable one
@private
@param {stream} chain
Enhance a stream to a chainable one