littlebits / stream-sift

A minimal high-performance specification-backed stateful object matching engine
MIT License
1 stars 1 forks source link

Validate that each function argument type-matches and constraint-passes its parameter. #16

Open jasonkuhrt opened 9 years ago

jasonkuhrt commented 9 years ago

For example:

{ input: { $gte: ["nonsense"] } }
Errors:

(1) Type Error: Argument '["nonsense"]' to function "$gte" does not match its parameter's type.: String, Number

{
  input: {            
    $gte: ["nonsense"]
          ^^^^^^^^^^^^ (1)
  }
}

Solutions:

(1) <$gte docs>