1.2.3 • Published 9 years ago

basic-tree v1.2.3

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

#Basic-Tree

An n-branching tree interface representing a list of data.

##Installation

npm install basic-tree

##Usage

import Tree from 'basic-tree';

let tree = new Tree({config:{branches: 3}})
/* creates a tree with three branches */

tree.node = 1;

tree.toFirst()
tree.node = 2;

tree.parent

tree.toLast()
tree.node = 3;

tree.toJS()
/* prints [1,2,,3]

###Navigation

####toNth() //0 indexed ####toFirst() ####toLast() ####root ####parent

###Setters

####root ####node ####children ####parent

###Traversal

#####preOrderDepth( callback ) #####postOrderDepth( callback ) #####preOrderBreadth( callback )

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.9

10 years ago

1.1.8

10 years ago

1.1.7

10 years ago

1.1.6

10 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago