0.0.2 • Published 5 years ago

@zingle/string-writer v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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))
    });
};