UNPKG

@tempots/std

Version:

Std library for TypeScript. Natural complement to the Tempo libraries.

15 lines (14 loc) 444 B
import { R as t } from "./result-CGd0jCdl.js"; const e = (r) => typeof r == "object" && !Array.isArray(r) && r != null, i = (r) => Array.isArray(r), n = (r) => typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r == null, c = (r) => { try { return t.success(JSON.parse(r)); } catch (s) { return t.failure(s); } }; export { i as isJSONArray, e as isJSONObject, n as isJSONPrimitive, c as parseJSON };