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

take/drop RangeError for async methods #185

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,9 @@ <h1>%AsyncIterator.prototype%.filter ( _filterer_ )</h1>
<h1>%AsyncIterator.prototype%.take ( _limit_ )</h1>
<emu-alg>
1. Let _iterated_ be ? GetIteratorDirect(*this* value).
1. Let _integerLimit_ be ? ToIntegerOrInfinity(_limit_).
1. Let _numLimit_ be ? ToNumber(_limit_).
1. If _numLimit_ is *NaN*, throw a *RangeError* exception.
1. Let _integerLimit_ be ! ToIntegerOrInfinity(_numLimit_).
1. If _integerLimit_ &lt; 0, throw a *RangeError* exception.
1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _integerLimit_ and performs the following steps when called:
1. Let _remaining_ be _integerLimit_.
Expand All @@ -805,7 +807,9 @@ <h1>%AsyncIterator.prototype%.take ( _limit_ )</h1>
<h1>%AsyncIterator.prototype%.drop ( _limit_ )</h1>
<emu-alg>
1. Let _iterated_ be ? GetIteratorDirect(*this* value).
1. Let _integerLimit_ be ? ToIntegerOrInfinity(_limit_).
1. Let _numLimit_ be ? ToNumber(_limit_).
1. If _numLimit_ is *NaN*, throw a *RangeError* exception.
1. Let _integerLimit_ be ! ToIntegerOrInfinity(_numLimit_).
1. If _integerLimit_ &lt; 0, throw a *RangeError* exception.
1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _integerLimit_ and performs the following steps when called:
1. Let _remaining_ be _integerLimit_.
Expand Down