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

Commit

Permalink
Merge branch 'main' into GH-229
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra authored Sep 13, 2022
2 parents 2f4209a + f29d0cd commit a65f454
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h1>Operations on Iterator Objects</h1>
<h1>
GetIteratorDirect (
_obj_: an ECMAScript language value,
): either a normal completion containing an IteratorRecord or a throw completion
): either a normal completion containing an Iterator Record or a throw completion
</h1>
<dl class="header">
</dl>
Expand Down Expand Up @@ -245,6 +245,7 @@ <h1>Iterator.from ( _O_ )</h1>
1. Let _usingIterator_ be ? GetMethod(_O_, @@iterator).
1. If _usingIterator_ is not *undefined*, then
1. Let _iteratorRecord_ be ? GetIterator(_O_, ~sync~, _usingIterator_).
1. If IsCallable(_iteratorRecord_.[[NextMethod]]) is *false*, throw a *TypeError* exception.
1. Let _hasInstance_ be ? OrdinaryHasInstance(%Iterator%, _iteratorRecord_.[[Iterator]]).
1. If _hasInstance_ is *true*, then
1. Return _iteratorRecord_.[[Iterator]].
Expand Down Expand Up @@ -327,13 +328,15 @@ <h1>AsyncIterator.from ( _O_ )</h1>
1. Let _iteratorRecord_ be *undefined*.
1. If _usingIterator_ is not *undefined*, then
1. Set _iteratorRecord_ to ? GetIterator(_O_, ~async~, _usingIterator_).
1. If IsCallable(_iteratorRecord_.[[NextMethod]]) is *false*, throw a *TypeError* exception.
1. Let _hasInstance_ be ? OrdinaryHasInstance(%AsyncIterator%, _iteratorRecord_.[[Iterator]]).
1. If _hasInstance_ is *true*, then
1. Return _iteratorRecord_.[[Iterator]].
1. If _iteratorRecord_ is *undefined*, then
1. Set _usingIterator_ to ? GetMethod(_O_, @@iterator).
1. If _usingIterator_ is not *undefined*, then
1. Let _syncIteratorRecord_ be ? GetIterator(_O_, ~sync~, _usingIterator_).
1. If IsCallable(_syncIteratorRecord_.[[NextMethod]]) is *false*, throw a *TypeError* exception.
1. Set _iteratorRecord_ to CreateAsyncFromSyncIterator(_syncIteratorRecord_).
1. If _iteratorRecord_ is *undefined*, set _iteratorRecord_ to ? GetIteratorDirect(_O_).
1. Let _wrapper_ be ! ObjectCreate(%WrapForValidAsyncIteratorPrototype%, &laquo; [[AsyncIterated]] &raquo;).
Expand Down

0 comments on commit a65f454

Please sign in to comment.