0.2.0 • Published 9 years ago

dir2 v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

dir2 NPM version NPM downloads Build Status

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