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

EXCLUDE Condition check memo #116

Closed
TyrealGray opened this issue Apr 13, 2020 · 0 comments
Closed

EXCLUDE Condition check memo #116

TyrealGray opened this issue Apr 13, 2020 · 0 comments
Labels

Comments

@TyrealGray
Copy link
Owner

TyrealGray commented Apr 13, 2020

conditions object

Example 1

{
	[CONDITION.EXCLUDE]: [{a: true, b: true}, {a:true}],
},

In this conditions object, it has one type of condition CONDITION.EXCLUDE.

In side EXCLUDE condition array, it is two object, one is {a: true, b: true} another is {a:true}.

If an object { a: any } pass into condition check with this EXCLUDE condition array, it will return null. Because first one b is excluded but a is not, second one a is not excluded in {a:true}, both condition not match.

If an object { b: any } pass into condition check with this EXCLUDE condition array, it will return EXCLUDE, 'a' . Because the first one a is excluded in {a: true, b: true} condition but b is included, so first one is not match, the second condition is matched, because a is excluded.

Example 2

{
	[CONDITION.EXCLUDE]: [{a: true}, {b:true}],
},

If an object { a: any } pass into condition check with this EXCLUDE condition array, it will return EXCLUDE, 'b' . Because even first one a is included, second one b is excluded in { a: any }.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant