2.0.0 • Published 6 years ago

children-dirs v2.0.0

Weekly downloads
4
License
MPL-2.0
Repository
github
Last release
6 years ago

children-dirs Build status for Children Dirs

Get paths of directories in a directory.

Why?

Install

npm install children-dirs --save

Usage

Get it into your program.

const childrenDirs = require('children-dirs');

Get a list of directories.

const dirs = await childrenDirs();
console.log(dirs);
// => ['/home/me/my-project/.git', '/home/me/my-project/lib']

API

childrenDirs(cwd)

Returns a Promise for an Array of absolute paths for directories that are immediate children of cwd.

cwd

Type: string Default: process.cwd()

The directory to search.

Contributing

See our contributing guidelines for more details.

  1. Fork it.
  2. Make a feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

License

MPL-2.0 © Seth Holladay

Go make something, dang it.