Add on/off support for parsing boolean.

This commit is contained in:
Marc-Andre Ferland 2022-11-05 13:33:38 -04:00
parent 749c72e6a6
commit f964fe3750

View File

@ -13,11 +13,13 @@ function parseBoolean(stringValue) {
switch(stringValue?.toLowerCase()?.trim()) { switch(stringValue?.toLowerCase()?.trim()) {
case "true": case "true":
case "yes": case "yes":
case "on":
case "1": case "1":
return true; return true;
case "false": case "false":
case "no": case "no":
case "off":
case "0": case "0":
case null: case null:
case undefined: case undefined: