1.4.0 dev mode support more ops and args

This commit is contained in:
2023-07-07 18:20:14 +08:00
parent ecfa32f75e
commit 1da4d38799
6 changed files with 176 additions and 30 deletions

View File

@@ -7,10 +7,12 @@ function getDefaultParams(param: any, val: any) {
if (typeof val === "string") {
return get ?? val;
} else if (typeof val === "number") {
return parseInt(get ?? `${val}`);
return parseFloat(get ?? `${val}`);
} else if (typeof val === "boolean") {
if (get === "stream") return true;
if (get === "fetch") return false;
if (get === "true") return true;
if (get === "false") return false;
return val;
}
}