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

Commit

Permalink
fixes #173: add section to README about accessing new intrinsics (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra authored Sep 26, 2022
1 parent 4288584 commit 665b350
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,15 @@ only consume the iterator when they need the next item from it. Especially
for iterators that never end, this is key. Without generic support for
any form of iterator, different iterators have to be handled differently.

### How can I access the new intrinsics?

```js
const IteratorHelperPrototype = Object.getPrototypeOf(Iterator.from([]).take(0));
const AsyncIteratorHelperPrototype = Object.getPrototypeOf(AsyncIterator.from([]).take(0));
const WrapForValidIteratorPrototype = Object.getPrototypeOf(Iterator.from({ next(){} }));
const WrapForValidAsyncIteratorPrototype = Object.getPrototypeOf(AsyncIterator.from({ async next(){} }));
```

## Prior Art & Userland implementations

- https://www.npmjs.com/package/itertools
Expand Down

0 comments on commit 665b350

Please sign in to comment.