New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

folder2json

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

folder2json

Creates a json file describing a nested directory

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

folder2json

Creates a json file describing a nested directory

This can be used in combination with Tree View Javascript packages to navigate your nested directories on the web.

Example usage with js-treeview

directory-navigation

Usage Instructions

  • npm install -g folder2json
  • cd <folder you wish to folder2json>
  • folder2json

Example Output:

{
    "path": "./",
    "name": ".",
    "children": [
        {
            "path": "darkness",
            "name": "darkness",
            "children": [
                {
                    "path": "darkness\\_meaning",
                    "name": "_meaning",
                    "children": [
                        {
                            "path": "darkness\\_meaning\\creation.m",
                            "name": "creation.m",
                            "size": 204,
                            "extension": ".m",
                            "type": "file"
                        },
                        {
                            "path": "darkness\\_meaning\\darkness.c",
                            "name": "darkness.c",
                            "size": 18,
                            "extension": ".c",
                            "type": "file"
                        },
                        {
                            "path": "darkness\\_meaning\\despair.t",
                            "name": "despair.t",
                            "size": 44805,
                            "extension": ".t",
                            "type": "file"
                        },
                        {
                            "path": "darkness\\_meaning\\fear.t",
                            "name": "fear.t",
                            "size": 50013,
                            "extension": ".t",
                            "type": "file"
                        },
                        {
                            "path": "darkness\\_meaning\\origins.txt",
                            "name": "origins.txt",
                            "size": 299,
                            "extension": ".txt",
                            "type": "file"
                        }
                    ],
                    "size": 95339,
                    "type": "directory"
                }
            ],
            "size": 95339,
            "type": "directory"
        }
    ],
    "size": 95339,
    "type": "directory"

FAQs

Package last updated on 31 Oct 2019

Did you know?

Socket

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