Skip to content

Commit

Permalink
Remove extraneous fields from SegmentIterator
Browse files Browse the repository at this point in the history
Fixes tc39#54
  • Loading branch information
gibson042 committed Nov 8, 2018
1 parent e24d601 commit 9aabd38
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ Move the iterator to the next break position after the given code unit index _in

Move the iterator to the previous break position before the given code unit index _index_, or if no index is provided, before its current index. Returns *true* if the beginning of the string was reached.

#### `get %SegmentIterator%.prototype.index`

Return the code unit index of the most recently discovered break position, as an offset from the beginning of the string. Initially the `index` is 0.

#### `get %SegmentIterator%.prototype.breakType`

The `breakType` of the most recently discovered segment. If there is no current segment (e.g., a just-instantiated SegmentIterator, or one which has reached the end), or if the break type is "grapheme", then this will be `undefined`.

## FAQ

Q: Why should we pass a locale and options bag for grapheme breaks? Isn't there just one way to do it?
Expand Down
18 changes: 0 additions & 18 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,24 +366,6 @@ <h1>%SegmentIteratorPrototype%.preceding( [ _from_ ] )</h1>
1. return AdvanceSegmentIterator(_iterator_, ~backwards~).
</emu-alg>
</emu-clause>

<emu-clause id="sec-segment-iterator-prototype-index">
<h1>get %SegmentIteratorPrototype%.index</h1>
<emu-alg>
1. Let _iterator_ be *this* value.
1. If _iterator_ does not have a [[SegmentIteratorSegmenter]] internal slot, throw a *TypeError* exception.
1. Return _iterator_.[[SegmentIteratorIndex]].
</emu-alg>
</emu-clause>

<emu-clause id="sec-segment-iterator-prototype-breakType">
<h1>get %SegmentIteratorPrototype%.breakType</h1>
<emu-alg>
1. Let _iterator_ be *this* value.
1. If _iterator_ does not have a [[SegmentIteratorSegmenter]] internal slot, throw a *TypeError* exception.
1. Return _iterator_.[[SegmentIteratorBreakType]].
</emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>

0 comments on commit 9aabd38

Please sign in to comment.