0.5.0 • Published 3 years ago
@diagrams-ts/graphviz-functional-ts v0.5.0
GraphViz-Functional
Create valid dot output using TypeScript. Get type support for all graph, node and edge properties. Use freely combinable render functions to create your dot input.
Installation and Requirements
Install this package by running:
npm install @diagrams-ts/graphviz-functional-ts
# or when using yarn
yarn add @diagrams-ts/graphviz-functional-ts
Usage
import { edges, createDotGraph } from "@diagrams-ts/graphviz-functional-ts";
createDotGraph([
...edges([
{ nodes: [{ id: "a1" }, { id: "b2" }] },
{ nodes: [{ id: "a1" }, { id: "b3" }] },
]),
]).then(console.log);
/*
* Will log:
*
* digraph "g" {
* a1->b2 ;
* a3->b4 ;
* }
*/