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

View File

@ -227,3 +227,12 @@ async function fetchWithTimeout(resource, options = {}) {
return response;
}
function isValidJson(json) {
try {
JSON.parse(json);
} catch (e) {
return false;
}
return true;
}