This commit is contained in:
Steven Tracey 2023-06-01 16:13:51 -04:00
parent c9c5110e15
commit 3d1a45cafe

View File

@ -226,4 +226,13 @@ async function fetchWithTimeout(resource, options = {}) {
clearTimeout(id);
return response;
}
function isValidJson(json) {
try {
JSON.parse(json);
} catch (e) {
return false;
}
return true;
}