1.3.1 • Published 2 years ago

@herberthe/filestree v1.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

FilesTree

version download GitHub license GitHub stars GitHub forks GitHub issues

A library for generating files tree.

Install

npm i @herberthe/filestree

# Or
yarn add @herberthe/filestree

# Or

pnpm add @herberthe/filestree

Usage

import { FilesTree } from "filestree"

const tree = new FilesTree({
    entry: "<Your Entry Path Here>",
    ...otherOptions
}).output()

console.log(tree)

Options

OptionTypeRequiredDefaultDescription
entrystring string[]-The entry path
depthnumber×InfinityThe depth of tree
filterRegExp FilterFunctionType×-The filter for filename
path"relative" "absolute"×"absolute"The path type for output
flatboolean×falseFlat the tree
output"path" "stats"×"path"The output type
custom<T extends any = any>(filename: string, path: string, stats: Stats) => T×-The custom output result function, If the optional function custom existed, the output option would not work!

For more details, see Types Defination

LICENSE

MIT

1.3.1

2 years ago

1.3.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago