Sha256: de776ba234ead109f83dcb8addd338e1899d141048337bb9aa2b74f324e0dab7
Contents?: true
Size: 286 Bytes
Versions: 26
Compression:
Stored size: 286 Bytes
Contents
/** * Parses a given value into a JSON. * Does not throw an exception on an invalid JSON string. */ export function jsonParse<ValueType extends Record<string, any>>( value: any, ): ValueType | undefined { try { return JSON.parse(value) } catch { return undefined } }
Version data entries
26 entries across 26 versions & 1 rubygems