Skip to content

Remove use of @ember/string - #1904

Merged
jenweber merged 1 commit into
masterfrom
jw-string-deprecation
Mar 13, 2023
Merged

jenweber merged 1 commit into
masterfrom
jw-string-deprecation

Conversation

@jenweber

@jenweber jenweber commented Mar 3, 2023 •

Copy link
Copy Markdown
Contributor

Replace it with plain old regex replace.

replaceAll would be easier to read, but may not be available in people's projects or node environments.

Similarly I decided not to escape the _ or -, since it's all by itself, but I could add an escape if preferred.

This addresses a blocker for emberjs/rfcs#898

@locks

locks commented Mar 3, 2023

Copy link
Copy Markdown
Contributor

From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll#browser_compatibility it seems most platforms have it since 2020 (Samsung Internet since 2021), so I think it's safe to use it!

@jenweber
jenweber merged commit 0569cd4 into master Mar 13, 2023
@jenweber
jenweber deleted the jw-string-deprecation branch March 13, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants