Skip to main content

compare_checked

Function compare_checked 

Source
pub fn compare_checked(
    a: &Value,
    b: &Value,
) -> Result<Ordering, IncomparableError>
Expand description

compareValues(a, b): strings by UTF-8 bytes, numbers numerically, false < true, and null before everything. Values of different non-null types, and arrays or objects, can’t be compared: JS throws.