Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobbubu/pull-reader
https://github.com/jacobbubu/pull-reader
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacobbubu/pull-reader
- Owner: jacobbubu
- License: mit
- Created: 2020-03-28T03:26:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-10T00:52:40.000Z (over 1 year ago)
- Last Synced: 2024-12-13T21:56:21.944Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 779 KB
- Stars: 0
- Watchers: 2
- 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
[![Build Status](https://travis-ci.org/jacobbubu/pull-reader.svg)](https://travis-ci.org/jacobbubu/pull-reader)
[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/pull-reader/badge.svg)](https://coveralls.io/github/jacobbubu/pull-reader)
[![npm](https://img.shields.io/npm/v/@jacobbubu/pull-reader.svg)](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()) // => {
})
```