Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
[spec] Remove fallback, per 2018.11.28 TC39 feedback
Browse files Browse the repository at this point in the history
Closes #39.
  • Loading branch information
ljharb committed Nov 29, 2018
1 parent 7670a0b commit 2159eae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ contributors: Jordan Harband
1. If _matcher_ is not *undefined*, then
1. Return ? Call(_matcher_, _regexp_, « _O_ »).
1. Let _S_ be ? ToString(_O_).
1. Let _matcher_ be ? RegExpCreate(_R_, `"g"`).
1. Let _global_ be *true*.
1. Let _fullUnicode_ be *false*.
1. Return ! CreateRegExpStringIterator(_matcher_, _S_, _global_, _fullUnicode_).
1. Let _rx_ be ? RegExpCreate(_R_, `"g"`).
1. Return ? Invoke(_rx_, @@matchAll, « _O_ »).
</emu-alg>
<emu-note>The `matchAll` function is intentionally generic, it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.</emu-note>
<emu-note>Similarly to `String.prototype.split`, `String.prototype.matchAll` is designed to typically act without mutating its inputs.</emu-note>
Expand Down
7 changes: 3 additions & 4 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ When the `matchAll` method is called, the following steps are taken:
1. If *matcher* is not **undefined**, then
1. Return ? [Call](call)(*matcher*, *regexp*, &laquo; *O* &raquo;).
1. Let *S* be ? [ToString][tostring](*O*).
1. Let *matcher* be ? [RegExpCreate][regexp-create](*R*, `"g"`).
1. Let *global* be **true**.
1. Let *fullUnicode* be **false**.
1. Return ! [CreateRegExpStringIterator](#createregexpstringiterator-abstract-operation)(*matcher*, *S*, *global*, *fullUnicode*).
1. Let *rx* be ? [RegExpCreate][regexp-create](*R*, `"g"`).
1. Return ? [Invoke][invoke](*rx*, @@matchAll, &laquo; *O* &raquo;).

Note 1: The `matchAll` function is intentionally generic, it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.
Note 2: Similarly to `String.prototype.split`, `String.prototype.matchAll` is designed to typically act without mutating its inputs.
Expand Down Expand Up @@ -171,3 +169,4 @@ This property has the attributes { [[Writable]]: **false**, [[Enumerable]]: **fa
[tolength]: https://tc39.github.io/ecma262/#sec-tolength
[set]: https://tc39.github.io/ecma262/#sec-set-o-p-v-throw
[to-boolean]: https://tc39.github.io/ecma262/#sec-toboolean
[invoke]: https://tc39.github.io/ecma262/#sec-invoke

0 comments on commit 2159eae

Please sign in to comment.