UNPKG
@lukeaus/plain-tree
Version:
latest (2.2.2)
2.2.2
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
1.4.0
1.3.0
1.2.0
1.1.1
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
A plain tree with a bunch of tree tools
github.com/lukeaus/plain-tree
lukeaus/plain-tree
@lukeaus/plain-tree
/
build
/
src
/
utilsNodeTree.d.ts
6 lines
(5 loc)
•
289 B
TypeScript
View Raw
1
2
3
4
5
6
import
{
SerializedNode
}
from
'./types'
;
import
Node
from
'./Node'
;
export
declare
const
nodeToJsonFormatter
:
(
node
:
Node
) =>
SerializedNode
;
export
declare
const
widthsByHeight
:
(
node
:
Node
) =>
number
[];
export
declare
const
flattenByHeight
:
(
node
:
Node
,
fn
?:
Function
) =>
any
[][];