Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deanlandolt/397866 to your computer and use it in GitHub Desktop.
Save deanlandolt/397866 to your computer and use it in GitHub Desktop.
"a!=aaa" is sugar for (identical to) "a.ne(aaa)" parses to:
[{
property:"a",
operator:"ne",
values: ["aaa"]
}]
"a=aaa" is sugar for (identical to) "a.eq(aaa)" parses to:
[{
property:"a",
operator:"ne",
values: ["aaa"]
}]
"a=in=2" is sugar for (identical to) "a.in(2)" parses to:
[{
property:"a",
operator:"in",
values: [2]
}]
"foo(2,4)" parses to:
[{
operator:"foo",
values: [2,4]
}]
"a.b=lt=2&c=3" is sugar for (identical to) "and(a.b.lt(2),c.eq(3))" parses to (note that the top level array is always implied to be a child of "and" operator):
[{
property:["a","b"],
operator:"lt",
values: [2]
},
{
property:"c",
operator:"eq"
}
]
"a=2|a=3" is sugar for (identical to) "or(a.eq(2),a.eq(3))" parses to:
[
{
operator:"or",
values:[
{
property:"a",
operator:"eq",
values: [2]
},
{
property:"a",
operator:"eq",
values: [3]
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment