switch DEBUG_LOG to string handling

This commit is contained in:
2025-07-08 21:09:07 +02:00
parent 35572a48e7
commit 7cdfa00af5
2 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,7 @@
export function isTruthy(value: string | number | boolean | null | undefined): boolean {
if (value === null || value === undefined) {
return false;
}
if (typeof value === 'string') {
return value.toLowerCase() === 'true' || !!+value; // here we parse to number first
}