fs-tree-structure
v0.0.5
Published
Build filesystem tree structure from flat paths
Downloads
126,112
Maintainers
Readme
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": {}
}
}
}
});