This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/predicate/isJSON.mjs
T

15 lines
216 B
JavaScript

function isJSON(value) {
if (typeof value !== 'string') {
return false;
}
try {
JSON.parse(value);
return true;
}
catch {
return false;
}
}
export { isJSON };