0.3.0 • Published 6 years ago
@drodsou/tree2text v0.3.0
@drodsou/tree2text
Converts object tree to text
installation
npm install @drodsou/tree2textusage
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