flatten-dir

1.0.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    4
  • 1.0.0
    1

Package Sidebar

Install

npm i flatten-dir

Weekly Downloads

5

Version

1.0.1

License

MIT

Last publish

Collaborators

  • onionkings