Repository navigation
Add String.hasNonWhitespace predicate - #10341
Merged
tim-smart merged 3 commits intoNov 3, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: a490696 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
tim-smart
enabled auto-merge (squash)
November 3, 2026 21:03
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 3, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Effect Bot <[email protected]>
tim-smart
pushed a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 6, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 6, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 6, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 6, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 6, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 6, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 7, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 7, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 7, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 8, 2026
Co-authored-by: Effect Bot <[email protected]>
tim-smart
pushed a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 18, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 18, 2026
Co-authored-by: Effect Bot <[email protected]>
This branch is waiting to be deployed
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.
Summary
Add
String.hasNonWhitespace(self: string): boolean, which returnstruewhen a string contains at least one non-whitespace character.String.isNonEmptyaccepts whitespace-only strings. This predicate rejects them without allocating a trimmed string, which suits validation and filtering:It uses
/\S/u.test(self), so whitespace means the same as in JavaScripttrim. Empty and whitespace-only strings returnfalse. Zero-width space (U+200B) and U+0085 count as content, consistent with JavaScript.The API is
@stability stablewith@since 4.2.0and aneffectminor changeset, so the release queue will retarget this PR tov4/next-minor.Verification
pnpm lintpnpm checkpnpm test --run packages/effect/test/String.test.tspnpm doctest --run packages/effect/src/String.tspnpm jsdocs --checkCloses EFF-3336