dir2
Get all directories within a directory.
Install
$ npm install --save dir2
Usage
const dir2 = require('dir2')
// async
dir2('.')
.then(dirs => {
console.log(dirs)
// => ['.git', 'node_modules']
})
// sync
dir2.sync('.')
API
dir2(sourceDirectory, [options])
sourceDirectory
Type: string
Required: true
The directory to look into.
options
prefix
Type: Boolean
Default: false
Prefixing source path to returned directory name. Like .git
=> /source/path/.git
.
License
MIT © EGOIST