feat(string): add strStartsWithAny, strEndsWithAny, strWrap, strUnwrap, strNormalizeNewlines#543
Merged
feat(string): add strStartsWithAny, strEndsWithAny, strWrap, strUnwrap, strNormalizeNewlines#543
Conversation
…p, strNormalizeNewlines Add five new string utility functions: - strStartsWithAny / strEndsWithAny: check whether a string starts or ends with any value in an array-like list of search values - strWrap / strUnwrap: wrap a string with a prefix/suffix pair, or remove a single wrapping pair when present - strNormalizeNewlines: normalize mixed newline sequences (\r\n, \r) to a canonical form (\n by default)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #543 +/- ##
=======================================
Coverage 99.45% 99.46%
=======================================
Files 142 145 +3
Lines 4196 4271 +75
Branches 903 915 +12
=======================================
+ Hits 4173 4248 +75
Misses 23 23
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds several new string helpers (starts/ends-with-any, wrap/unwrap, newline normalization) and updates docs/size budgets to accommodate the new surface area.
Changes:
- Added new string utilities:
strStartsWithAny,strEndsWithAny,strWrap,strUnwrap,strNormalizeNewlines. - Added common tests covering the new helpers.
- Updated bundle size thresholds and removed completed items from the feature backlog.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/string/wrap.ts | Introduces strWrap / strUnwrap helpers. |
| lib/src/string/starts_ends_with_any.ts | Introduces strStartsWithAny / strEndsWithAny. |
| lib/src/string/normalize_newlines.ts | Introduces strNormalizeNewlines. |
| lib/src/index.ts | Re-exports new helpers; adjusts existing exports. |
| lib/src/helpers/base.ts | Updates isStrictNullOrUndefined and isDefined typing/docs. |
| lib/test/src/common/string/wrap.test.ts | Adds tests for wrap/unwrap behavior. |
| lib/test/src/common/string/starts_ends_with_any.test.ts | Adds tests for starts/ends-with-any behavior. |
| lib/test/src/common/string/normalize_newlines.test.ts | Adds tests for newline normalization behavior. |
| lib/test/bundle-size-check.js | Updates bundle-size thresholds used by tests. |
| .size-limit.json | Updates size-limit thresholds for dist outputs. |
| docs/feature-backlog.md | Removes the now-implemented string utilities backlog section. |
nevware21-bot
approved these changes
Apr 2, 2026
Contributor
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add new string utility functions: