@enigmaoffline/node-file-tree
v1.0.0
Published
Simple File Tree for NodeJS
Downloads
3
Maintainers
Readme
Node File Tree
Simple file tree data structure coded for NodeJS
Install
Installing with npm
npm i --save @enigmaoffline/node-file-tree
Usage
Importing
const FTree = require("github-fetch");
const ft = new FTree('./src');
ft.setIgnoreNodeModules(false);
ft.printTree();
ft.travel(
(node, layer) => {
// do something when file is reached
},
(node, layer) => {
// do something when directory is reached
}
);