npm.io
0.1.2 • Published 11 years ago

dirmatch

Licence
public domain
Version
0.1.2
Deps
3
Vulns
6
Weekly
0

dirmatch

Match multiple patterns with all files in directory using minimatch.

Install

npm install dirmatch

Usage

var dirmatch = require('dirmatch')

var matches = dirmatch('path/of/dir', [
  '*.js',
    '!node/*.js'
])
dirmatch(dir, patterns, [options])

Matches patterns with paths in directory.
Returns array of matched paths.

dir

Type: string

Directory path.

patterns

Type: array<string>

List of minimatch patterns.

Patterns that begin with ! will exclude files. Patterns are processed in order, so inclusion and exclusion order is significant.

options

Type: object

Options for minimatch.

License

Public domain, see the LICENCE.md file.

Keywords