pull-reader

1.3.1 • Public • Published

pull-reader

read bytes from a binary pull-stream

example

var Reader = require('pull-reader')
var File = require('pull-file')
var reader = Reader(1000) //1 second timeout, abort upstream if read takes longer than this.
 
 
pull(
  File('./package.json'),
  reader
)
 
//read the first byte of a file
reader.read(1, function (err, data) {
  console.log(data.toString()) // => {
})
 

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i pull-reader

Weekly Downloads

522

Version

1.3.1

License

MIT

Unpacked Size

16 kB

Total Files

11

Last publish

Collaborators

  • dominictarr