sequentalreader

    1.0.2 • Public • Published

    Build Status

    sequentalreader

    Sequentally read arbitrary chunks of exactly desired amount of data from any ReadableStream

    Usage

    var readNext = require('sequentalreader')(process.stdin);
    
    readNext(10)
      .then((res) => {
        if (res === null) console.log('EOF');
        console.log('first 10 characters: %s', res);
        return readNext(5);
      })
      .then((res) => {
        if (res === null) console.log('EOF');
        console.log('next 5 characters: %s', res);
      });
    

    Install

    npm i sequentalreader

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • shabarin