Skip to content
PACKAGES

assertStrictJsonValue()

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

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

The narrowed, validated value.

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

packages/ts/src/json/codec.ts