# dotgitignore

> find the closest .gitignore file, parse it, and apply ignore rules

Latest version **2.1.0** (published 2019-03-16) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2019-03-16 |
| First published | 2018-01-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 2 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ben Coe |
| Maintainers | bcoe |
| Keywords | gitignore, git, ignore, .gitignore |

## Links

- npm: https://www.npmjs.com/package/dotgitignore
- Repository: https://github.com/bcoe/dotgitignore
- Homepage: https://github.com/bcoe/dotgitignore#readme
- Issues: https://github.com/bcoe/dotgitignore/issues
- npm.io page: https://npm.io/package/dotgitignore

## Dependencies (2)

- [find-up](https://npm.io/package/find-up.md) ^3.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4

## Recent versions

- 2.1.0 (latest) — 2019-03-16
- 2.0.0 — 2018-12-12
- 1.0.3 — 2018-01-03
- 1.0.2 — 2018-01-03
- 1.0.1 — 2018-01-02
- 1.0.0 — 2018-01-02

## README

# dotgitignore

[![Build Status](https://travis-ci.org/bcoe/dotgitignore.svg)](https://travis-ci.org/bcoe/dotgitignore)

find the closest .gitignore file, parse it, and apply ignore rules.

## Usage

_Given the following `.gitignore`:_

```
.DS_Store
node_modules
coverage
.nyc_output
```

```js
const dotgit = require('dotgitignore')()
dotgit.ignore('.DS_Store') // returns 'true'.
dotgit.ignore('README.md') // returns 'false'.
```

## API

* `require('dotgitignore')([opts])`: return instance of `dotgitignore`, optionally
  configured with `opts`:
  * `opts.cwd`: current working directory (defaults to process.cwd()).
* `dotgit.ignore(name)`: returns `true` if pattern is ignored, `false` otherwise.

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