@lukeaus/plain-tree
Version:
A plain tree with a bunch of tree tools
6 lines (5 loc) • 320 B
TypeScript
import { NodeOrNull, SerializedNode } from './types';
import Node from './Node';
export declare const nodeToJsonFormatter: (node: Node) => SerializedNode;
export declare const widthsByHeight: (node: NodeOrNull) => Array<number>;
export declare const flattenByHeight: (node: NodeOrNull, fn?: Function | null) => any[][];