Skip to content
PACKAGES

assertStrictJsonObject()

Validate and normalize a host value into a strict canonical JSON object.

import { assertStrictJsonObject } from "@graphrefly/ts/storage";
function assertStrictJsonObject(
value: unknown,
label = "strictJsonObject",
): StrictJsonObject
ParameterTypeDescription
valueunknownUnknown value to check or decode.
labelunknownlabel value used by the helper.

The narrowed, validated value.

import { assertStrictJsonObject } from "@graphrefly/ts/storage";

packages/ts/src/json/codec.ts