From dbfb7d5b38c4b76f35e45722c4b423076205e6fc Mon Sep 17 00:00:00 2001 From: Noah Silas Date: Wed, 12 Oct 2022 09:06:30 -0700 Subject: [PATCH] docs: Note special case in `AbstractCursor.forEach()` iterator (#3445) This undocumented behavior is surprising. Adding a note here may help future users. --- src/cursor/abstract_cursor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index b29c1e0760..79ec34d4d3 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -400,6 +400,8 @@ export abstract class AbstractCursor< /** * Iterates over all the documents for this cursor using the iterator, callback pattern. * + * If the iterator returns `false`, iteration will stop. + * * @param iterator - The iteration callback. * @param callback - The end callback. */