render nested hierarchies `npm ls` style with unicode pipes
npm install @lunjs/archy```
npm install @lunjs/archy
``
const archy = require('@lunjs/archy');
const s = archy.draw({
label : 'beep',
nodes : [
'ity',
{
label : 'boop',
nodes : [
{
label : 'o_O',
nodes : [
{
label : 'oh',
nodes : [ 'hello', 'puny' ]
},
'human'
]
},
'party\ntime!'
]
}
]
});
console.log(s);
``
beep
├── ity
└─┬ boop
├─┬ o_O
│ ├─┬ oh
│ │ ├── hello
│ │ └── puny
│ └── human
└── party
time!
| Key | Value |
| -- | -- |
| style | default is 'NPM', support 'NPM' or 'FMW' |'label'
| label | default is , support function |'nodes'
| nodes | default is , support function |true
| unicode | default is |false
| drawRootBranch | default is |''
| prefix | default is |Infinity
| concurrency | default is , only for drawAsync` |