2.0.3 • Published 5 months ago

file-tree-walker-ts v2.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 months ago

file-tree-walker-ts

File tree walker written in TypeScript.

Installation

npm install --save file-tree-walker-ts

Example Usage

import { FileTreeWalker } from "file-tree-walker-ts";

new FileTreeWalker()
    .setAllowedFileTypes(["ts", "js"])
    .onDirectory((directoryPath: string, directoryName: string) => {
        console.log(directoryPath, directoryName);
    })
    .onFile((filePath: string, filename: string, fileExtension: string, content: string) => {
        console.log(filePath, filename, fileExtension, content);
    })
    .walk("path");