UNPKG

es-toolkit

Version:

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

19 lines (15 loc) 311 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function isJSON(value) { if (typeof value !== 'string') { return false; } try { JSON.parse(value); return true; } catch { return false; } } exports.isJSON = isJSON;