Search
Preparing search index...
The search index is not available
js-hierarchy
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
js-hierarchy
AbstractNode
Class AbstractNode
A starting point Node implementation to extend from
Hierarchy
AbstractNode
SimpleNode
Implements
Node
Index
Constructors
constructor
Properties
_children
_data
_log
_name
_parent
Accessors
name
Methods
_get
Node
ByPath
Array
add
Child
find
Child
get
Child
ByName
get
Children
get
Data
get
Level
get
Node
ByPath
get
Node
ByPath
Array
get
Parent
get
Path
get
Path
Nodes
get
Root
is
Root
remove
Child
set
Data
set
Parent
toJSON
walk
Constructors
constructor
new
Abstract
Node
(
name
?:
string
, data
?:
object
)
:
AbstractNode
Parameters
Optional
name:
string
Optional
data:
object
[
p:
string
]:
any
Returns
AbstractNode
Properties
Private
_children
_children
:
Node
[]
= []
Private
_data
_data
:
object
Type declaration
[
key:
string
]:
any
Protected
_log
_log
:
loglevel.Logger
= null
Private
_name
_name
:
string
= ""
Private
_parent
_parent
:
Node
= null
Accessors
name
get
name
(
)
:
string
set
name
(
value
:
string
)
:
void
Returns
string
Parameters
value:
string
Returns
void
Methods
Private
_get
Node
ByPath
Array
_get
Node
ByPath
Array
(
node
:
Node
, pathComponents
:
Array
<
string
>
)
:
Bluebird
<
Node
>
Parameters
node:
Node
pathComponents:
Array
<
string
>
Returns
Bluebird
<
Node
>
add
Child
add
Child
(
child
:
Node
, position
?:
number
)
:
Node
Parameters
child:
Node
Optional
position:
number
Returns
Node
find
Child
find
Child
(
child
:
Node
)
:
number
Parameters
child:
Node
Returns
number
get
Child
ByName
get
Child
ByName
(
name
:
string
)
:
Node
Parameters
name:
string
Returns
Node
get
Children
get
Children
(
)
:
Node
[]
Returns
Node
[]
get
Data
get
Data
(
key
:
string
)
:
any
Parameters
key:
string
Returns
any
get
Level
get
Level
(
)
:
number
Returns
number
get
Node
ByPath
get
Node
ByPath
(
path
:
string
, pathSeparator
?:
string
)
:
Bluebird
<
Node
>
Parameters
path:
string
Optional
pathSeparator:
string
Returns
Bluebird
<
Node
>
get
Node
ByPath
Array
get
Node
ByPath
Array
(
pathNodes
:
Array
<
string
>
, absolute
:
boolean
)
:
Bluebird
<
Node
>
Parameters
pathNodes:
Array
<
string
>
absolute:
boolean
Returns
Bluebird
<
Node
>
get
Parent
get
Parent
(
)
:
Node
Returns
Node
get
Path
get
Path
(
pathSeparator
?:
string
)
:
Bluebird
<
string
>
Parameters
Optional
pathSeparator:
string
Returns
Bluebird
<
string
>
get
Path
Nodes
get
Path
Nodes
(
)
:
Bluebird
<
Array
<
Node
>
>
Returns
Bluebird
<
Array
<
Node
>
>
get
Root
get
Root
(
)
:
Node
Returns
Node
is
Root
is
Root
(
)
:
boolean
Returns
boolean
remove
Child
remove
Child
(
child
:
Node
|
number
)
:
void
Parameters
child:
Node
|
number
Returns
void
set
Data
set
Data
(
key
:
string
, value
:
any
)
:
Node
Parameters
key:
string
value:
any
Returns
Node
set
Parent
set
Parent
(
node
:
Node
)
:
void
Parameters
node:
Node
Returns
void
toJSON
toJSON
(
)
:
string
Returns
string
walk
walk
(
direction
:
Direction.up
|
Direction.down
|
Direction.left
|
Direction.right
|
Direction.rootUp
|
(
Direction.up
|
Direction.down
|
Direction.left
|
Direction.right
|
Direction.rootUp
)
[]
, action
:
ActionFunction
)
:
Bluebird
<
void
>
Parameters
direction:
Direction.up
|
Direction.down
|
Direction.left
|
Direction.right
|
Direction.rootUp
|
(
Direction.up
|
Direction.down
|
Direction.left
|
Direction.right
|
Direction.rootUp
)
[]
action:
ActionFunction
Returns
Bluebird
<
void
>
Globals
Internals
Test
Externals
js-
hierarchy
Direction
Abstract
Node
constructor
_children
_data
_log
_name
_parent
name
_get
Node
ByPath
Array
add
Child
find
Child
get
Child
ByName
get
Children
get
Data
get
Level
get
Node
ByPath
get
Node
ByPath
Array
get
Parent
get
Path
get
Path
Nodes
get
Root
is
Root
remove
Child
set
Data
set
Parent
toJSON
walk
Data
Not
Found
Error
Down
Walker
Empty
Path
Error
Invalid
Direction
Error
Invalid
Node
Error
Left
Walker
Node
Not
Found
Error
Right
Walker
Root
UpWalker
Simple
Node
Up
Walker
Node
Walker
Action
Function
Generated using
TypeDoc
A starting point Node implementation to extend from