dirflat
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

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"]

Package Sidebar

Install

npm i dirflat

Weekly Downloads

5

Version

1.1.2

License

MIT

Unpacked Size

4.34 kB

Total Files

12

Last publish

Collaborators

  • stranothus