dir2

0.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i dir2

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • kchan