@drodsou/tree2text
v0.3.0
Published
Converts object tree to text
Downloads
7
Maintainers
Readme
@drodsou/tree2text
Converts object tree to text
installation
npm install @drodsou/tree2text
usage
const tree2text = require('@drodsou/tree2text');
let treeAsString = tree2text(myTree, myRender);
api
for structure of myTree
and myRender
parameters see index.js
JSDoc comments of the funcion and the test examples in /test
examples
see /tests folder for examples of conversion to ToC, HTML, React
built-in HTML render
Note that the HTML render is included by default in /lib, you can use it just specifying passing the string html
instead of the myRender
object