Detalhes do pacote

fs-tree-structure

antoine-coulon197.8kMIT0.0.5

Build filesystem tree structure from flat paths

javascript, tree, nodejs, filesystem

readme (leia-me)

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": {}
      }
    }
  }
});