Skip to content

Conversation

@Phillip9587
Copy link
Contributor

Replaced String.prototype.replace with a regex with String.prototype.replaceAll for:

  • Double spaces (/\x20{2}/g)
  • Newlines (/\n/g)

Why?

  • replaceAll is more efficient for direct string replacements
  • Reduces regex overhead

@wesleytodd wesleytodd merged commit 59a45ca into pillarjs:master Feb 10, 2025
8 checks passed
@wesleytodd wesleytodd mentioned this pull request Feb 10, 2025
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.

4 participants