Skip to content

Parse the flowchart-fun syntax into a graph object which contains nodes and edges with labels.

License

Notifications You must be signed in to change notification settings

mattwoodco/flowchart-fun-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flowchart fun parser

Parse the flowchart-fun syntax into a graph object which contains nodes and edges with labels.

For those not familiar with this syntax it uses indentation to express parent-child relationships. See it in action at https://flowchart.fun


Installation

npm install flowchart-fun-parser

Usage

import { parse } from "flowchart-fun-parser";

parse(`parent
  child
    grandchild`);

/* 
Returns...
{
  "nodes": [...],
  "edges": [...]
}
*/

Repository Goals

Giving the parser its own package has the following goals:

  • support the flowchart.fun webapp
  • allow for other tools to be built on top of the same syntax
  • get community input on developing and enhancing the features of the syntax
  • focus on parsing speed with benchmarking

Language Goals

Parse indentation syntax into nodes and edges with their respective labels and data attributes (** check here), create ID's for each node and edge.

Demos

The demos folder shows examples of using different renderers. Open Interactive Demos

Areas of Exploration

  • ** Supporting generalized data attributes, probably in the syntax of css selectors ([key="value"])
  • Creating ID's which use some portion of the label text with a number for order of appearance, so that there is more referential integrity when associating meta information with graph information.

About

Parse the flowchart-fun syntax into a graph object which contains nodes and edges with labels.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 89.3%
  • CSS 5.7%
  • JavaScript 3.5%
  • HTML 1.5%