Description
The contains functions does not works at the null.
Steps to Reproduce
- The following code to be included in the main.rs
use jslt::Jslt;
use serde_json::json;
use std::fs;
fn main() -> Result<(), Box <dyn std::error::Error> > {
let jslt: Jslt = r#"
contains("hi",null)
"#.parse()?;
let input = json!({
"data": [
[1, 2, 3, 4, 5],
[6, 7, 8, 9, 10]
]
});
let output = jslt.transform_value(&input)?;
println!("{}",output);
assert_eq!("false", output.to_string());
Ok(())
}
Actual Output
Error: InvalidInput("Arguments must be array | object | string")
Expected Output
false
Environment
Nightly Rust Toolchain