GraphReFlyTS

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

ParameterTypeDescription
valueunknownUnknown value to check or decode.
labelunknownlabel value used by the helper.

Returns

The narrowed, validated value.

Example

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

Source

packages/ts/src/json/codec.ts