Skip to content
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

[ufc] add null operator and more fixes #50

Merged
merged 11 commits into from
Apr 15, 2024
Merged

Conversation

schmit
Copy link
Contributor

@schmit schmit commented Apr 12, 2024


labels: mergeable

Fixes: #issue

Motivation and Context

  • Adding the IS_NULL operator
  • Type check return value
  • Fix date logic

Description

How has this been tested?

Comment on lines +14 to +24
function encodeRuleValue(condition: Condition) {
switch (condition.operator) {
case 'ONE_OF':
case 'NOT_ONE_OF':
return condition.value.map((value) => getMD5Hash(value.toLowerCase()));
case 'IS_NULL':
return getMD5Hash(`${condition.value}`);
default:
return encodeBase64(`${condition.value}`);
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aarsilv heads-up: adding extra logic here to handle the IS_NULL operator

@schmit schmit changed the title add null operator -- needs more tests [ufc] add null operator Apr 15, 2024
@schmit schmit changed the title [ufc] add null operator [ufc] add null operator and more fixes Apr 15, 2024
src/evaluator.spec.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@aarsilv aarsilv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

src/client/eppo-client.spec.ts Show resolved Hide resolved
src/client/eppo-client.ts Show resolved Hide resolved
src/evaluator.spec.ts Show resolved Hide resolved
src/evaluator.spec.ts Show resolved Hide resolved
src/interfaces.ts Show resolved Hide resolved
@schmit schmit merged commit ee3d43a into ufc-revamp Apr 15, 2024
2 checks passed
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.

3 participants