streaming-line-reader

1.0.9 • Public • Published

streaming-line-reader

It will stream lines, so you can wait and write to any source by piping it to output stream (Writable stream). While you wait it doesn't overwhelm your system memory, this is the benefit we get when we use NodeJS Streams. Process huge files with low memory footprint.

 
    const getReadLineStream = require('streaming-line-reader');
 
    const inputFile = '/sample/input/file.txt';
    const outputFile = '/sample/output/file.txt';
    const readLineStream = await getReadLineStream(inputFile);
    const writeStream = fs.createWriteStream(outputFile);
    // you can also create your own Writable stream
    readLineStream.pipe(writeStream);
 

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i streaming-line-reader

    Weekly Downloads

    2

    Version

    1.0.9

    License

    ISC

    Unpacked Size

    22.8 kB

    Total Files

    5

    Last publish

    Collaborators

    • muqsithirfan