nv-path-inode

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i nv-path-inode

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.52 kB

Total Files

3

Last publish

Collaborators

  • ihgazni2