1.0.0 • Published 3 years ago
nv-path-inode v1.0.0
nv-path-inode
- nv-path-inode is very simple util to sort and fullfill relative-paths of unique-nodes
install
- npm install nv-path-inode
usage
example
const {fullfill,creat_tree} = require('nv-path-inode')
var pls = [
[3,4,5],
[1,2,3],
[3,6,7],
[7,8]
]
> fullfill(pls)
[
[ 1 ],
[ 1, 2 ],
[ 1, 2, 3 ],
[ 1, 2, 3, 4 ],
[ 1, 2, 3, 4, 5 ],
[ 1, 2, 3, 6 ],
[ 1, 2, 3, 6, 7 ],
[ 1, 2, 3, 6, 7, 8 ]
]
>
var t = creat_tree(pls)
> t.$sdfs_repr(r=>" ".repeat(r.$depth())+r.v)
1
2
3
4
5
6
7
8
APIS
- nvpls.fullfill(pls)
- nvpls.creat_tree(pls)
LICENSE
- ISC
1.0.0
3 years ago