flatten-dir

flatten all files of a directory into an array recursively.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
flatten-dir
001.0.16 years ago6 years agoMinified + gzip package size for flatten-dir in KB

Readme

flatten-dir
This is a tool that flatten all files of a directory into an array recursively.

Installation

```bash $ npm install flatten-dir ```

Usage

It will return a promise, so you can get some files by ``then`` method. ```js const flattenDir = require('flatten-dir') flattenDir('/foo') .then(files => console.log(files)) // 'baz', 'bar' .catch(err => console.error(err)) ```

License

MIT