From 7f786112db9965462adc4dd879e5d6fa63eae994 Mon Sep 17 00:00:00 2001 From: D-nDev3 Date: Wed, 6 Nov 2024 14:29:22 -0300 Subject: [PATCH] feat: update is_on check to string and readme --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 67 ++++++++++++++++++++++++++++++++++++++++++++ src/model_private.rs | 2 +- 4 files changed, 70 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8058354..becddd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -354,7 +354,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "growthbook-rust-sdk" -version = "0.1.0" +version = "0.1.1" dependencies = [ "chrono", "hashers", diff --git a/Cargo.toml b/Cargo.toml index 5c4e160..1ad3ccd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "growthbook-rust-sdk" -version = "0.1.0" +version = "0.1.1" edition = "2021" authors = [ "Deroldo bool { let is_on = if value.is_null() { false - } else if (value.is_number() && value.force_f64(-1.0) != 0.0) || (value.is_string() && value.force_string("any") != "") { + } else if (value.is_number() && value.force_f64(-1.0) != 0.0) || (value.is_string() && (value.force_string("any") != "" || value.force_string("any") != "OFF")) { true } else if value.is_boolean() { value.as_bool().unwrap_or(false)