Skip to content

Commit be762b0

Browse files
committed
Add note regarding mutability
1 parent 7434c4c commit be762b0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • lib/node_modules/@stdlib/array/to-iterator

lib/node_modules/@stdlib/array/to-iterator/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ var count = ctx.count;
153153

154154
- If an environment supports `Symbol.iterator`, the returned iterator is iterable.
155155
- If provided a generic `array`, the returned iterator does **not** ignore holes. To achieve greater performance for sparse arrays, use a custom iterator.
156+
- A returned iterator does **not** copy a provided array-like `object`. To ensure iterable reproducibility, copy a provided array-like `object` **before** creating an iterator. Otherwise, any changes to the contents of an array-like `object` will be reflected in the returned iterator.
156157

157158
</section>
158159

0 commit comments

Comments
 (0)