1.1.2 • Published 2 years ago

dirflat v1.1.2

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

dirflat

dirflat is a very basic function to recursively fetch all files in a directory, including sub-directories.

File structure:

.
+-- foo.txt
+-- bar.js
+-- index.js
+-- _test
|   +-- foo.js
|   +-- bar.txt

index.js

const dirFlat = require("dirflat");

dirFlat("./").then(console.log);
// ouputs ["./foo.txt", "./bar.js", "./index.js", "./test/foo.js", "./test/bar.txt"]