Skip to content

Commit da05b13

Browse files
committed
Fix description of buffering
1 parent f5c0692 commit da05b13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ This module will automatically buffer incoming data if `.next` hasn't been calle
4545

4646
- `onClose`: A function that's called with whatever you resolve from the listener after the async iterator is done, perfect to do cleanup
4747
- `onError`: A function that's called with any error that happens in the listener or async iterator
48-
- `buffering`: (default: `true`) Whether incoming values should be buffered before the async iterator starts listening or not
48+
- `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()`)
49+
4950

5051
```js
5152
asyncify(listenToNewMessages, {
@@ -56,7 +57,6 @@ asyncify(listenToNewMessages, {
5657
onError: (err) => {
5758
errorTracking.capture(err);
5859
},
59-
// Don't buffer incoming messages before the async iterator starts listening
6060
buffering: false
6161
})
6262
```

0 commit comments

Comments
 (0)