JSPM

@enigmaoffline/node-file-tree

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q15070F
  • License MIT

Simple File Tree for NodeJS

Package Exports

  • @enigmaoffline/node-file-tree

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@enigmaoffline/node-file-tree) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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
    }
);