API Reference
assertStrictJsonObject()
Validate and normalize a host value into a strict canonical JSON object.
Import
import { assertStrictJsonObject } from "@graphrefly/ts";
Signature
function assertStrictJsonObject(
value: unknown,
label = "strictJsonObject",
): StrictJsonObject
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | Unknown value to check or decode. |
label | unknown | label value used by the helper. |
Returns
The narrowed, validated value.
Example
import { assertStrictJsonObject } from "@graphrefly/ts";
Source
packages/ts/src/json/codec.ts