Skip to content

Added new comparators: (not_)contains and case-insensitive versions#288

Open
vincent-derks wants to merge 5 commits intocontrolfrom
vincentderks/fla-2506-add-contains-and-matches-operators-case-insensitive
Open

Added new comparators: (not_)contains and case-insensitive versions#288
vincent-derks wants to merge 5 commits intocontrolfrom
vincentderks/fla-2506-add-contains-and-matches-operators-case-insensitive

Conversation

@vincent-derks
Copy link
Contributor

@vincent-derks vincent-derks commented Feb 26, 2026

Add contains operator and case-insensitive comparators

Summary

  • Adds CONTAINS and NOT_CONTAINS comparators for substring matching
  • Adds optional case-insensitivity flag via a 4th tuple element: [LHS, Comparator, RHS, { ci: true }]
  • CI is supported for all string-based comparators (EQ, ONE_OF, STARTS_WITH, ENDS_WITH, CONTAINS, and their negations, plus the array comparators)

Backwards compatibility

The 4th-element approach was chosen specifically for backwards compat. Old SDKs destructure only 3 elements from the condition tuple, so { ci: true } is silently ignored and the condition evaluates case-sensitively (graceful degradation). New comparators like CONTAINS fall through to default and return false on old SDKs -- no crash, just a skipped rule.

@vercel
Copy link
Contributor

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flags-sdk-dev Ready Ready Preview, Comment, Open in v0 Feb 26, 2026 2:44pm
flags-sdk-next-15 Ready Ready Preview, Comment, Open in v0 Feb 26, 2026 2:44pm
flags-sdk-next-16 Ready Ready Preview, Comment, Open in v0 Feb 26, 2026 2:44pm
flags-sdk-snippets Ready Ready Preview, Comment, Open in v0 Feb 26, 2026 2:44pm
flags-sdk-sveltekit-snippets Ready Ready Preview, Comment, Open in v0 Feb 26, 2026 2:44pm
shirt-shop Ready Ready Preview, Comment, Open in v0 Feb 26, 2026 2:44pm
shirt-shop-api Ready Ready Preview, Comment, Open in v0 Feb 26, 2026 2:44pm

@vincent-derks vincent-derks force-pushed the vincentderks/fla-2506-add-contains-and-matches-operators-case-insensitive branch from 8cf223e to 36f74f9 Compare February 26, 2026 13:24
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.

1 participant