Skip to content

Commit

Permalink
fix: push changed api in the last release
Browse files Browse the repository at this point in the history
should have been a major version bump

BREAKING CHANGE: push now returns true or false
  • Loading branch information
reconbot committed Mar 26, 2018
1 parent fa81d66 commit 05e4bca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ console.log('caught them all')

#### ReadStream

Create a read-promise stream. Pass it a function that takes the number of bytes or objects of wanted data and and uses `this.push` or `return` to push values or promises. This function should return a promise that indicates when the object/chunk are fully processed. Return `null` to end the stream.
Create a read-promise stream. Pass it a function that takes the number of bytes or objects of wanted data and and uses `this.push` or `return` to push values or promises. This function should return a promise that indicates when the object/chunk are fully processed. Return or push `null` to end the stream.

Options:
* `read` - An optional way to pass the read function
Expand All @@ -70,8 +70,8 @@ A `ReadStream` works like a normal `ReadableStream` but the `_read` and `push()`
- Pushes any non `undefined` return values

`this.push()`
- Can be pushed a promise
- Returns a promise
- Can be pushed a promise, which will be resolved and then pushed as normal
- returns true or false like a normal stream's push

This allows you to use it in some friendly ways.

Expand Down

0 comments on commit 05e4bca

Please sign in to comment.