# dirmatch

> Match multiple patterns with all files in directory

Latest version **0.1.2** (published 2015-01-29) · public domain license · 0 weekly downloads

## Install

```sh
npm install dirmatch
pnpm add dirmatch
yarn add dirmatch
bun add dirmatch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-01-29 |
| First published | 2015-01-01 |
| Weekly downloads | 0 |
| License | public domain |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | sunflowerdeath |
| Maintainers | sunflowerdeath |
| Keywords | minimatch |

## Links

- npm: https://www.npmjs.com/package/dirmatch
- Repository: https://github.com/sunflowerdeath/dirmatch
- Issues: https://github.com/sunflowerdeath/dirmatch/issues
- npm.io page: https://npm.io/package/dirmatch

## Dependencies (3)

- [minimatch](https://npm.io/package/minimatch.md) ^2.0.1
- [walk-sync](https://npm.io/package/walk-sync.md) ^0.1.3
- [underscore](https://npm.io/package/underscore.md) ^1.7.0

## Recent versions

- 0.1.2 (latest) — 2015-01-29
- 0.1.1 — 2015-01-03
- 0.1.0 — 2015-01-03
- 0.0.1 — 2015-01-02
- 0.0.0 — 2015-01-01

## README

# dirmatch

Match multiple patterns with all files in directory using
[minimatch](https://github.com/isaacs/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.
<br>
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.

---
_Source: https://npm.io/package/dirmatch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
