json-logic-js
json-logic-js copied to clipboard
Build complex rules, serialize them as JSON, and execute them in JavaScript
Could you please rename the main file from `logic.js` to `json-logic.js`?
Some rules may want to include validation of data types. Imagine: `"typeof": [ "a", "string" ]` -- evaluates to true if "a" is a string or not.
Please lint and minify the source code.
Adds typeof support for the simple operators.
Adds highlighting, autoBracketClose, and bracketMatching 
Hello. Is there a way (out of the box) to use a global variable in the iteration operators like "some" or another way to create a similar rule? I need...
Instead of passing all the data as parameters, sometimes it is necessary to calculate it on the fly, e.g. ```js jsonLogic.apply({ "var": ["my_input"] }, function (name, default value) { return...
Fixes https://github.com/jwadhams/json-logic-js/issues/116 This PR is a revision of https://github.com/jwadhams/json-logic-js/pull/117. I have to admit I wasn't sure the best way to go about this PR -- let me know if I...
Hello gays, Is there a way to do an in-place data update? For exemple, I have de following rule: ```json { "if": [ { "some": [{ "var": "groups" }, {...
If you do a subtraction with a 0 in the list of values to subtract, the results is incorrect. Example: `{"-": [10, 0, 100]}` should be -90 but it returns...