dir2
Get all directories within a directory.
Last updated 4 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install dir2 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.2.0                                ...           latest (4 years ago)

2 Versions

  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |