tree-measurer
A javascript tool to measure properties of trees for Node.js and browser with browserify.
This tool borns with the intention of enabling easier tests about tree structures. It supply a series of methods that measures properties of tree nodes.
Installation
$ npm install tree-measurer
Usage
var TreeMeasurer =var treeSample =data: 6left:data: 8right:data: 11right:data: 1var measure =childNames: 'left' 'right'parentName: 'parent'dataName: 'data'measureheighttree // 2measureheighttreeright // 0measure // 1measure // 1measure // falsemeasure // truemeasure // falsemeasuredatatreeright // 1measure /* {data: 8,right: {data: 11}}*/
API Documentation
TO DO
- Add support to use this tool in legacy browsers (Now >= IE9)
Licence
MIT