Skip to content
On this page

isValidJSON

Validates if a string is a valid JSON.

Usage

ts
import { isValidJSON } from '@use-kit/functions'

isValidJSON('{ "foo": "bar" }') // true
import { isValidJSON } from '@use-kit/functions'

isValidJSON('{ "foo": "bar" }') // true

Released under the MIT License.