-
Type: New Feature
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
Change streams support manual promise-based iteration using `next`, `hasNext` and `tryNext`. Making the ChangeStream an async iterable would allow idiomatic use in for-await loops.
Additionally, we could use this in conjunction with Readable.from to convert our change stream to a NodeJS readable stream automatically, with full support for resumability (future improvement and not in scope for this work).
Acceptance Criteria
- Implement Symbol.asyncIterator for the ChangeStream class
- is related to
-
NODE-4682 Refactor ReadableCursorStream to use Node's Readable.from [post-v6]
- Backlog