Skip to content
This repository was archived by the owner on Feb 19, 2021. It is now read-only.
This repository was archived by the owner on Feb 19, 2021. It is now read-only.

How should replaceAll behave if searchValue is a non-global RegExp? #16

@jridgewell

Description

@jridgewell

Related to, but different from #8. #8 wants it to auto-convert a non-global regex to a global regex. I think we should accept regex searchValues, but not convert them to a global regex.

String.p.matchAll is setting precedent for "all" methods:

'test'.matchAll(/t/); // => [ [first t match] ] 'test'.matchAll(/t/g); // => [ [first t match], [second t match] ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions