Skip to content

feat(micro-utilities): add strip-outer to replacements - #1260

Merged
43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/strip-outer
Nov 20, 2026
Merged

43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/strip-outer

Conversation

@maksimgm

Copy link
Copy Markdown
Contributor

🔗 Linked issue

closes #1194

📚 Description

adds strip-outer (~5.4M weekly downloads) to micro-utilities with a new snippet::strip-surrounding-substring, just a RegExp per the comment on the issue:

str.replace(/^foo|foo$/g, '')

this is what strip-outer@1.0.1 (~86% of downloads) already does internally. checked against 1.0.1 and 2.0.0 with the substring on one side, both sides, the whole string, repeated and absent, same output

43081j
43081j previously approved these changes Nov 20, 2026
@43081j
43081j merged commit a8b5804 into e18e:main Nov 20, 2026
5 checks passed
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.

[Replacement]: strip-outer

2 participants