GraphReFlyTS

API Reference

describeToJson()

Render a D39 describe snapshot as deterministic JSON text.

Import

import { describeToJson } from "@graphrefly/ts/graph";

Signature

function describeToJson(
	snapshot: DescribeSnapshot,
	opts: DescribeToJsonOptions = {},
): string

Parameters

ParameterTypeDescription
snapshotDescribeSnapshotsnapshot value used by the helper.
optsDescribeToJsonOptionsOptions that configure the helper.

Returns

A string value.

Example

import { describeToJson } from "@graphrefly/ts/graph";

Source

packages/ts/src/graph/render.ts