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
JSONLogic is defined to accept the elements in an array as the argument to an operation.
However, your operations accept an array and the original data object.
With all the testing I've done so far, it seems like everything officially supported in the JS port works the same in this Ruby port.
Ex)
Ok, thanks for letting me know! Feel free to submit a PR to fix this, I'd love to have it in. I'm pretty busy these days, so I don't get to dropin as often.
I've noticed that the operations in this port work entirely different then they do in the original JS port.
Specifically here:
json-logic-ruby/lib/json_logic/operation.rb
Line 117 in 97b4b5d
JSONLogic is defined to accept the elements in an array as the argument to an operation.
However, your operations accept an array and the original data object.
With all the testing I've done so far, it seems like everything officially supported in the JS port works the same in this Ruby port.
Ex)
The result of this will be
3
in both ports ✅However, if you were to define something like this in ruby:
and in JS
You end up with
3
in Ruby and1
in JS. ❌Ultimately this leads to inconsistencies when trying to develop cross-platform.
The text was updated successfully, but these errors were encountered: