UNPKG

@tempots/std

Version:

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

2 lines (1 loc) 448 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./result-CdwVhaAc.cjs"),s=r=>typeof r=="object"&&!Array.isArray(r)&&r!=null,i=r=>Array.isArray(r),o=r=>typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r==null,n=r=>{try{return t.Result.success(JSON.parse(r))}catch(e){return t.Result.failure(e)}};exports.isJSONArray=i;exports.isJSONObject=s;exports.isJSONPrimitive=o;exports.parseJSON=n;