1.2.3 • Published 8 years ago

basic-tree v1.2.3

Weekly downloads
3
License
ISC
Repository
github
Last release
8 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

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.9

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago