https://github.com/tone-row/flowchart-fun-parser
Parse the flowchart-fun syntax into a graph object which contains nodes and edges with labels.
https://github.com/tone-row/flowchart-fun-parser
flowchart graph language network syntax
Last synced: about 1 month ago
JSON representation
Parse the flowchart-fun syntax into a graph object which contains nodes and edges with labels.
- Host: GitHub
- URL: https://github.com/tone-row/flowchart-fun-parser
- Owner: tone-row
- License: mit
- Created: 2022-08-13T08:34:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-15T06:04:32.000Z (almost 4 years ago)
- Last Synced: 2025-12-26T17:05:59.675Z (6 months ago)
- Topics: flowchart, graph, language, network, syntax
- Language: TypeScript
- Homepage: https://flowchart-fun-parser-demos.vercel.app
- Size: 109 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# flowchart fun parser
Parse the [flowchart-fun](https://github.com/tone-row/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
### [✨ Open Interactive Demos ✨](https://flowchart-fun-parser-demos.vercel.app/)
---
## Installation
```bash
npm install flowchart-fun-parser
```
## Usage
```js
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)](#areas-of-exploration), create ID's for each node and edge.
## Demos
The demos folder shows examples of using different renderers. [Open Interactive Demos](https://flowchart-fun-parser-demos.vercel.app/)
## 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.