🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

fs-tree-structure

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-tree-structure

Build filesystem tree structure from flat paths

0.0.5
latest
npm
Version published
Weekly downloads
44K
-14.16%
Maintainers
1
Weekly downloads
 
Created
Source

fs-tree-structure builds a filesystem tree structure from a list of flat paths.

const filePaths = ["lib/feature/index.js", "lib/feature/util/index.js"];

const treeStructure = makeTreeStructure(filePaths);

assert.deepEqual(treeStructure, {
  lib: {
    feature: {
      "index.js": {},
      util: {
        "index.js": {}
      }
    }
  }
});

Keywords

javascript

FAQs

Package last updated on 30 Jan 2024

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