stringify-tree
Convert a tree structure to an ASCII tree, in approximately the style of npm ls
This is in TypeScript, which helps since you pass it some functions.
install
npm install stringify-tree
trivial example
; ; console.logstringifyTreetree, t.name, t.children;
┬ Grandmarti
├─┬ Cyndi
│ └─┬ Jess
│ ├── Evelyn
│ └── Linda
└── Celia
real-life example
; // parser stuff from Atomist. trust me, it makes a TreeNode with fields like the above ;console.logstringifyTreeast, treeNodeName, treeNodeChildren;