Never Pay your Mortgage

    This package has been deprecated

    Author message:

    Deprecated. Use pipe-io(https://github.com/coderaiser/pipe-io)

    util-pipe

    0.9.3 • Public • Published

    Util Pipe [DEPRECATED] use pipe-io

    create

    Easy way to create pipe which would handle all error events and redirect tham to callback.

        var pipe        = require('util-pipe'),
            NameFrom    = 'README.md',
            NameTo      = 'README_COPY.gz',
            
            options     = {
                gzip: true
            };
        
        pipe.create(NameFrom, NameTo, options, function(error) {
            var msg = 'done';
            
            console.log(error || msg);
        });

    getBody

    Get body of readStream

        var pipe        = require('util-pipe'),
            fs          = require('fs'),
            NAME        = 'README.md',
            readStream  = fs.createReadStream(NAME);
        
        pipe.getBody(readStream, function(error, data) {
            console.log(error || data);
        });

    Keywords

    none

    Install

    npm i util-pipe

    DownloadsWeekly Downloads

    3

    Version

    0.9.3

    License

    MIT

    Last publish

    Collaborators

    • coderaiser