Skip to content

Add "require" option and beta image publish workflow #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 18, 2025
Merged

Conversation

varthe
Copy link
Owner

@varthe varthe commented May 17, 2025

Issue: #14

Currently, when comparing two values, we use the .includes() function. For example:

  • [1,2,3,4,5].includes(3) will return true because the number 3 appears in the array
  • "The quick brown fox jumps over the lazy dog".includes("fox") will return true because the word fox is present in the string

This is safer than using x === y and works 99% of the time.

The user who reported the issue says they have a condition for the keyword anime. They want anything with that keyword to trigger a specific filter. They came across a movie containing the keyword based on anime which incorrectly triggered their condition, because we use the .include() function. So what happened was:

  • "based on anime".includes("anime") -> true

To help with this I added a new require option which will only return true if the values match exactly.
Also, this change will first be released in the new beta image to allow the user to test it before we make a public release. This is because we don't want to accidentally brick people's existing implementations.

Ignore the spacing changes they're just automatic formatting from an extension.

@varthe varthe self-assigned this May 17, 2025
@varthe varthe merged commit 4783020 into main May 18, 2025
1 check passed
@varthe varthe deleted the require-filter branch May 18, 2025 14:31
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