package
read bytes from a binary pull stream
npm install pull-readerGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
15.6 kB
Includes dependencies.
read bytes from a binary pull-stream
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()) // => {
})
MIT