Skip to content

Commit

Permalink
fix: compare helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Nov 18, 2024
1 parent 612f4ef commit 190bc3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/helper_extras.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use crate::json::value::JsonTruthy;
handlebars_helper!(eq: |x: Json, y: Json| x == y);
handlebars_helper!(ne: |x: Json, y: Json| x != y);
handlebars_helper!(gt: |x: Json, y: Json| compare_json(x, y) == Some(Ordering::Greater));
handlebars_helper!(gte: |x: Json, y: Json| compare_json(x, y) == Some(Ordering::Less));
handlebars_helper!(gte: |x: Json, y: Json| compare_json(x, y).is_some_and(|ord| ord != Ordering::Less));
handlebars_helper!(lt: |x: Json, y: Json| compare_json(x, y) == Some(Ordering::Less));
handlebars_helper!(lte: |x: Json, y: Json| compare_json(x, y) == Some(Ordering::Greater));
handlebars_helper!(lte: |x: Json, y: Json| compare_json(x, y).is_some_and(|ord| ord != Ordering::Greater));
handlebars_helper!(and: |x: Json, y: Json| x.is_truthy(false) && y.is_truthy(false));
handlebars_helper!(or: |x: Json, y: Json| x.is_truthy(false) || y.is_truthy(false));
handlebars_helper!(not: |x: Json| !x.is_truthy(false));
Expand Down

0 comments on commit 190bc3b

Please sign in to comment.