file-tree-walker-ts
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

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

Package Sidebar

Install

npm i file-tree-walker-ts

Weekly Downloads

266

Version

2.0.3

License

MIT

Unpacked Size

11.5 kB

Total Files

9

Last publish

Collaborators

  • o-su