For fun. I also thought that printTree could be very useful in the future when debugging.
Solution
printTree() will put this kind of ASCII diagram in the console:
root
└─┬ v1
├─┬ 2
│ └── main
└─┬ f
└── chess
getTree() will return an object that has the full hierarchical structure for the tree. This could be a good alternative to branchStream for some downstream modules.
Context
For fun. I also thought that
printTree
could be very useful in the future when debugging.Solution
printTree()
will put this kind of ASCII diagram in the console:getTree()
will return an object that has the full hierarchical structure for the tree. This could be a good alternative tobranchStream
for some downstream modules.The new dependency has a tiny footprint.