children-dirs

2.0.0 • Public • Published

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.

Package Sidebar

Install

npm i children-dirs

Weekly Downloads

1

Version

2.0.0

License

MPL-2.0

Last publish

Collaborators

  • sholladay