1.0.1 • Published 8 years ago

flatten-dir v1.0.1

Weekly downloads
41
License
MIT
Repository
github
Last release
8 years ago

flatten-dir

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

Installation

$ npm install flatten-dir

Usage

It will return a promise, so you can get some files by then method.

const flattenDir = require('flatten-dir')

flattenDir('/foo')
  .then(files => console.log(files)) // ['baz', 'bar']
  .catch(err => console.error(err))

License

MIT