Skip to content

feat(regexp/unstable): add replaceAllAsync#7031

Merged
kt3k merged 1 commit intodenoland:mainfrom
lionel-rowe:replace-all-async
Mar 9, 2026
Merged

feat(regexp/unstable): add replaceAllAsync#7031
kt3k merged 1 commit intodenoland:mainfrom
lionel-rowe:replace-all-async

Conversation

@lionel-rowe
Copy link
Contributor

Closes #7030

@lionel-rowe lionel-rowe requested a review from kt3k as a code owner March 4, 2026 22:06
@github-actions github-actions bot added the regexp label Mar 4, 2026
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.71%. Comparing base (9c5b710) to head (0c31b2f).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7031      +/-   ##
==========================================
- Coverage   93.71%   93.71%   -0.01%     
==========================================
  Files         620      621       +1     
  Lines       49401    49413      +12     
  Branches     8655     8655              
==========================================
+ Hits        46294    46305      +11     
  Misses       2516     2516              
- Partials      591      592       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kt3k
Copy link
Member

kt3k commented Mar 6, 2026

I'm a bit unsure whether this belongs to std/regexp as the original replaceAll is an string method. How about std/text?

@lionel-rowe
Copy link
Contributor Author

I'm a bit unsure whether this belongs to std/regexp as the original replaceAll is an string method. How about std/text?

@kt3k Could argue the case either way, personally I'd be more likely to look under regexp but maybe that's just me. Also, it's kinda a method on RegExp as well, just that it lives under Symbol.replace instead:

assertEquals(
    'abcd'.replaceAll(/[b-c]/g, ''),
    /[b-c]/g[Symbol.replace]('abcd', ''),
)

@kt3k
Copy link
Member

kt3k commented Mar 9, 2026

Ok. std/regexp now makes sense to me

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit 5f3572a into denoland:main Mar 9, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@std/regex: replaceAllAsync

2 participants