fs-tree-structure
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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

/fs-tree-structure/

    Package Sidebar

    Install

    npm i fs-tree-structure

    Weekly Downloads

    35,982

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    5.82 kB

    Total Files

    6

    Last publish

    Collaborators

    • antoine-coulon