subdirs
Version:
list of all subdirectories
41 lines (26 loc) • 1.11 kB
Markdown
# subdirs
[](https://travis-ci.org/jarofghosts/subdirs)
[](https://www.npmjs.org/package/subdirs)
[](https://www.npmjs.org/package/subdirs)
[](https://github.com/feross/standard)
[](https://github.com/jarofghosts/subdirs/blob/master/LICENSE)
get a list of all subdirectories
## Usage
```js
var subdirs = require('subdirs')
subdirs(root, function (err, dirs) {
console.log(dirs) // all of your subdirs are in here!
})
// or..
subdirs(root)
.then(function (dirs) {
// all of your subdirs are in _here!_
})
```
## API
`subdirs(rootDir[, depth, callback])`
### Notes
* If `callback` is omitted, a promise is returned.
* If `depth` is omitted, it defaults to `Infinity`
## License
MIT