chore: parse DEBUG setting as an object

This commit is contained in:
Azgaar 2024-10-22 14:45:25 +02:00 committed by sofronaspe
parent bf1a40776d
commit 1e00161611
8 changed files with 28 additions and 17 deletions

View file

@ -56,3 +56,11 @@ JSON.isValid = str => {
}
return true;
};
JSON.safeParse = str => {
try {
return JSON.parse(str);
} catch (e) {
return null;
}
};