From fcdd76f89158eb12250bcb8a2eceb00043be83df Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 9 Aug 2026 20:29:27 +0100 Subject: [PATCH] Add additional boolean operand parsing in utils.js This update expands the `parseBooleanOperand` function to handle more string representations of boolean values, including '1', '0', 'on', 'off', 'y', and 'n'. This enhancement improves the flexibility and robustness of boolean parsing in the application. --- src/utils.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/utils.js b/src/utils.js index 9fcd29a..037b69d 100644 --- a/src/utils.js +++ b/src/utils.js @@ -87,6 +87,15 @@ function parseBooleanOperand(value) { const lower = String(value).trim().toLowerCase(); if (lower === 'yes') return true; if (lower === 'no') return false; + if (lower === 'true') return true; + if (lower === 'false') return false; + if (lower === '1') return true; + if (lower === '0') return false; + if (lower === 'on') return true; + if (lower === 'off') return false; + if (lower === 'y') return true; + if (lower === 'n') return false; + if (typeof value === 'boolean') return value; return undefined; }