Jeremy Wadhams

Results 51 comments of Jeremy Wadhams

Proposed tests, in the common test format from http://jsonlogic.com/tests.json like `[ test, data, expected result ]` ```json "Unary syntax sugar, interpreted as one string arg", [ {"length":"apple"}, null, 5], "Normal...

`(null >= 0) === true` in both JavaScript and PHP (the two reference languages I was worried about when I started writing JsonLogic). In fact, both the implementations I maintain...

Well, there has been some heat in other places around building type-safe language implementations, where `{ "

So part of the problem is that JsonLogic is pretty crummy at handling inline objects, because it tries to use `{"test":"value"}` as logic too. Way at the bottom of the...

I don't think the documentation is clear enough. As implemented, `max` returns the largest **argument** (and assumes all arguments are numeric or coercable to a numeric) but no implementation really...

Could you rewrite it to use `all`? ``` {"all":[ [1,2], {"in":[{"var":""}, [0,1,2,3]]} ]} ``` Otherwise you could add an operation: ``` jsonLogic.add_operation('containsAll', function(needles, haystack){ return needles .map((needle) => haystack.indexOf(needle) !==...

Yeah, it's not needful yet the way I'm using it, but I can see what you mean. I'm tempted to use something other than `=` as the assignment operator, to...

thaaaat sucks. That's a design flaw, all the example cases I considered only used literal and the value being tested inside the test. I'm open to suggestion on how to...

The central problem is that `undefined` is a valid internal JavaScript concept, but it has no parallel in JSON. That's why the standard functionality of `var` is to return null...

I can honestly say I never considered this. The `var` operation [casts its input to a String before using it](https://github.com/jwadhams/json-logic-js/blob/master/logic.js#L129) this is **especially** to support sub-indexing (which is accomplished with...