This package has been deprecated

Author message:

integrated-into-nvlang-and-this-is-useless-now

nv-path-abspls

1.0.3 • Public • Published

nv-path-abspls

  • nv-path-abspls is very simple util to sort and fullfill absolute-paths

install

  • npm install nv-path-abspls

usage

example

const {fullfill,creat_tree} = require('nv-path-abspls')

var pls = [
   [1, 2, 4],
   [1, 2, 4, 3],
   [1, 3, 6],
   [1, 5 ,2 ,1 ,7],
]
 
> fullfill(pls)
[
  [ 1 ],
  [ 1, 2 ],
  [ 1, 2, 4 ],
  [ 1, 2, 4, 3 ],
  [ 1, 3 ],
  [ 1, 3, 6 ],
  [ 1, 5 ],
  [ 1, 5, 2 ],
  [ 1, 5, 2, 1 ],
  [ 1, 5, 2, 1, 7 ]
]
>   

var t = creat_tree(pls)
> t.$sdfs_repr(r=>"  ".repeat(r.$depth())+r.v)
1
   2
      4
         3
   3
      6
   5
      2
         1
            7

APIS

  • abspls.level_group(pls)
  • abspls.fullfill(pls)
  • abspls.creat_tree(pls)

LICENSE

  • ISC

Readme

Keywords

none

Package Sidebar

Install

npm i nv-path-abspls

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

3.62 kB

Total Files

3

Last publish

Collaborators

  • ihgazni2