You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Very basic example of using jsonautotree to read a few example nodes and//structure the tree and branches automatically.var nodeTree = require('./jsonautotree.js');var fs = require('fs');//I normally install the fs functions and then just grab every node in the libvar nodes = fs.readdirSync('./examples/nodes');for (var i = 0; i < nodes.length; i++) { nodeTree.buildBranch('./examples/nodes/' + nodes[i]);}//Then get a node and all its properties, grabbed heirarchicallyvar school = nodeTree.getNode('school');//Test to make sure school inherited the shape propertyconsole.log("Nodetype 'school' has 'shape' property of: " + school.shape);