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

Commit 63567bb

Browse files
fixes #143: rename asIndexedPairs to indexed (#183)
Co-authored-by: Michael Ficarra <[email protected]>
1 parent aacb5bc commit 63567bb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ result.next(); // {value: 4, done: false};
133133
result.next(); // {value: 5, done: false};
134134
```
135135

136-
### `.asIndexedPairs()`
136+
### `.indexed()`
137137

138-
`.asIndexedPairs` takes no arguments. It returns an iterator where each value produced by the underlying iterator is paired with a counter, starting at 0 and increasing by 1 with every element produced.
138+
`.indexed` takes no arguments. It returns an iterator where each value produced by the underlying iterator is paired with a counter, starting at 0 and increasing by 1 with every element produced.
139139

140140
Returns an iterator of pairs.
141141

@@ -145,7 +145,7 @@ Returns an iterator of pairs.
145145
const abc = ["a", "b", "c"].values();
146146

147147
const result = abc
148-
.asIndexedPairs();
148+
.indexed();
149149
result.next(); // {value: [0, "a"], done: false};
150150
result.next(); // {value: [1, "b"], done: false};
151151
result.next(); // {value: [2, "c"], done: false};

spec.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,8 @@ <h1>%Iterator.prototype%.drop ( _limit_ )</h1>
579579
</emu-alg>
580580
</emu-clause>
581581

582-
<emu-clause id="sec-iteratorprototype.asindexedpairs">
583-
<h1>%Iterator.prototype%.asIndexedPairs ( )</h1>
582+
<emu-clause id="sec-iteratorprototype.indexed">
583+
<h1>%Iterator.prototype%.indexed ( )</h1>
584584
<emu-alg>
585585
1. Let _iterated_ be ? GetIteratorDirect(*this* value).
586586
1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and performs the following steps when called:
@@ -824,8 +824,8 @@ <h1>%AsyncIterator.prototype%.drop ( _limit_ )</h1>
824824
</emu-alg>
825825
</emu-clause>
826826

827-
<emu-clause id="sec-asynciteratorprototype.asindexedpairs">
828-
<h1>%AsyncIterator.prototype%.asIndexedPairs ( )</h1>
827+
<emu-clause id="sec-asynciteratorprototype.indexed">
828+
<h1>%AsyncIterator.prototype%.indexed ( )</h1>
829829
<emu-alg>
830830
1. Let _iterated_ be ? GetIteratorDirect(*this* value).
831831
1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and performs the following steps when called:

0 commit comments

Comments
 (0)