1.1.3 • Published 6 years ago

map-to-linked v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

map-to-linked

from Hash table to linked table

Tip : 4 spaces indentation are required in json file

// before : "summary.json" file 

{
    "a":{
        "b":{
            "c":1
        }
    },
    "d":{
        "e":2
    }
}


// after : generator a named "linked.json" file 


[{
    "id": 1,
    "pid": -1,
    "layer": 1,
    "type": "dir",
    "content": "a"
}, {
    "id": 2,
    "pid": 1,
    "layer": 2,
    "type": "dir",
    "content": "b"
}, {
    "id": 3,
    "pid": 2,
    "layer": 3,
    "type": "file",
    "content": "c:1"
}, {
    "id": 4,
    "pid": -1,
    "layer": 1,
    "type": "dir",
    "content": "d"
}, {
    "id": 5,
    "pid": 4,
    "layer": 2,
    "type": "file",
    "content": "e:2"
}]

install

npm install -g map-to-linked

Usage

#1: default look for "summay.json" file as source
map-to-linked

#2: custom
map-to-linked source=myname.json
1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago