Socket
Socket
Sign inDemoInstall

map-to-linked

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

map-to-linked

from Hash table to linked table


Version published
Maintainers
1
Weekly downloads
3
decreased by-50%

Weekly downloads

Readme

Source

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

FAQs

Last updated on 10 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc