UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

15 lines (13 loc) 216 B
function isJSON(value) { if (typeof value !== 'string') { return false; } try { JSON.parse(value); return true; } catch { return false; } } export { isJSON };