Skip to content

Conversation

fredrikj31
Copy link
Owner

No description provided.

BREAKING CHANGE: The "condition" type has been changed to be an array

This means that from now on, you'll need to provide a single or multiple conditions in an array.
The conditions logic is based on an "OR" condition, so only one of the conditions needs to be true.
If all of the conditions are false, then the flag is returning false.
Adds support for multiple conditions in the "isEnabled" helper function.
It's a return fast approach, when means only one of the conditions needs to be true.
This also means that the conditions are thought of as an "OR" statement.
- Wraps all the conditions into an array (a single condition)
- Adds a new test with multiple conditions in the index.test.ts file
updates documentation to align with new multiple (array) conditions
@fredrikj31 fredrikj31 force-pushed the multiple-conditions branch from 0d22085 to 9bea9a4 Compare August 18, 2025 18:13
@fredrikj31 fredrikj31 marked this pull request as ready for review August 18, 2025 18:13
@fredrikj31 fredrikj31 merged commit 451b08b into main Aug 18, 2025
1 check passed
@fredrikj31 fredrikj31 deleted the multiple-conditions branch August 18, 2025 18:13
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

1 participant