You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation is literally just calling the language builtin in this case... there's a little extra sugar to allow a three-way-comparison (for "between" like 0 <= X <= 2) but it all boils down to JavaScript, in it's ineffable way, deciding that 0 <= null is true
The implementation already puts all the boring operations (the ones that don't control flow and can be executed depth-first) in the operations object so you could replace the default <= using one of your own design (maybe throwing a type error if you try to compare with NULL) just by using addOperation without having to fork the project itself.
You could also use addOperation to implement an <== operator for your own, then you'd have both tools available. It didn't occur to me in the JsonLogic spec because no language I work in day-to-day has one.
let's consider this rule, looking for values between or equals 0 and 1
with data being 0, it works
with data being null, this is wrongly interpreted
The text was updated successfully, but these errors were encountered: