Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 665b350

Browse files
fixes #173: add section to README about accessing new intrinsics (#235)
1 parent 4288584 commit 665b350

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,15 @@ only consume the iterator when they need the next item from it. Especially
420420
for iterators that never end, this is key. Without generic support for
421421
any form of iterator, different iterators have to be handled differently.
422422

423+
### How can I access the new intrinsics?
424+
425+
```js
426+
const IteratorHelperPrototype = Object.getPrototypeOf(Iterator.from([]).take(0));
427+
const AsyncIteratorHelperPrototype = Object.getPrototypeOf(AsyncIterator.from([]).take(0));
428+
const WrapForValidIteratorPrototype = Object.getPrototypeOf(Iterator.from({ next(){} }));
429+
const WrapForValidAsyncIteratorPrototype = Object.getPrototypeOf(AsyncIterator.from({ async next(){} }));
430+
```
431+
423432
## Prior Art & Userland implementations
424433

425434
- https://www.npmjs.com/package/itertools

0 commit comments

Comments
 (0)