mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-05-01 23:04:48 +02:00
Add on/off support for parsing boolean.
This commit is contained in:
parent
749c72e6a6
commit
f964fe3750
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user