Skip to content

Sequentally read arbitrary chunks of data from ReadableStream

License

Notifications You must be signed in to change notification settings

shabarin/sequentalreader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Sequentally read arbitrary chunks of data from ReadableStream

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published