Skip to content

Commit 1a20395

Browse files
committed
Fix readme
1 parent 081e70a commit 1a20395

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

README.MD

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,3 @@ buffer.push('first');
7373
buffer.push('stop');
7474
buffer.push('ignored'); // This value won't be processed since the buffer is closed after "stop".
7575
```
76-
77-
78-
### API
79-
80-
API
81-
82-
new AsyncIterableBuffer<T>()
83-
84-
Creates a new instance of the asynchronous buffer.
85-
86-
Methods
87-
- **push(value: T): void**
88-
Pushes a new value into the buffer. Throws an error if the buffer has been ended.
89-
- **end(): void**
90-
Marks the buffer as completed and resolves any pending requests with { done: true }.
91-
- **next(): Promise<IteratorResult<T>>**
92-
Returns a promise that resolves to the next buffered value. If the buffer is empty but not ended, it waits until a value is pushed.
93-
- **return(): Promise<IteratorResult<T>>**
94-
Ends the buffer and returns a result indicating that the iterator is done. This is useful for early termination of iteration.
95-
- **[Symbol.asyncIterator](): AsyncIterableIterator<T>**
96-
Returns the async iterator itself, enabling for await...of loops.

0 commit comments

Comments
 (0)