https://github.com/jacobbubu/pull-reader
https://github.com/jacobbubu/pull-reader
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacobbubu/pull-reader
- Owner: jacobbubu
- License: mit
- Created: 2020-03-28T03:26:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-10T00:52:40.000Z (about 2 years ago)
- Last Synced: 2025-06-06T23:06:45.978Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 779 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: code-of-conduct.md
Awesome Lists containing this project
README
# @jacobbubu/pull-reader
[](https://travis-ci.org/jacobbubu/pull-reader)
[](https://coveralls.io/github/jacobbubu/pull-reader)
[](https://www.npmjs.com/package/@jacobbubu/pull-reader/)> Rewritten [pull-reader](https://github.com/dominictarr/pull-reader) in TypeScript.
# pull-reader
read bytes from a binary pull-stream
## example
``` js
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()) // => {
})
```