Skip to content

Node.js function to read input streams into strings

License

Notifications You must be signed in to change notification settings

Zingle/string-writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The stringWriter function creates writable streams which can be passed around and used as strings.

Usage

const stringWriter = require("@zingle/string-writer");

function processReadableStream(input, done) {
    const output = stringWriter();

    // output can be used as a Writable stream
    input.pipe(output).on("end", () => {
        // output can also be used as a String
        console.info("output: ${output}");

        done(String(output))
    });
};

About

Node.js function to read input streams into strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published