Skip to content

Commit

Permalink
Fix description of buffering
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr committed Mar 14, 2018
1 parent f5c0692 commit da05b13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ This module will automatically buffer incoming data if `.next` hasn't been calle

- `onClose`: A function that's called with whatever you resolve from the listener after the async iterator is done, perfect to do cleanup
- `onError`: A function that's called with any error that happens in the listener or async iterator
- `buffering`: (default: `true`) Whether incoming values should be buffered before the async iterator starts listening or not
- `buffering`: (default: `true`) Whether incoming values should be buffered in between requests for the next value in the async iterable (note: disabling this will make your iterator "lossy" if you don't immediately call `.next()`)


```js
asyncify(listenToNewMessages, {
Expand All @@ -56,7 +57,6 @@ asyncify(listenToNewMessages, {
onError: (err) => {
errorTracking.capture(err);
},
// Don't buffer incoming messages before the async iterator starts listening
buffering: false
})
```
Expand Down

0 comments on commit da05b13

Please sign in to comment.