1.0.2 • Published 4 years ago

@jacobbubu/pull-reader v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

@jacobbubu/pull-reader

Build Status Coverage Status npm

Rewritten pull-reader in TypeScript.

pull-reader

read bytes from a binary pull-stream

example

import Reader from '@jacobbubu/pull-reader'
import File from '@jacobbubu/pull-file'
const 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()) // => {
})