# @types/parse-gitignore

> TypeScript definitions for parse-gitignore

Latest version **1.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/parse-gitignore
pnpm add @types/parse-gitignore
yarn add @types/parse-gitignore
bun add @types/parse-gitignore
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-11-07 |
| First published | 2020-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/parse-gitignore
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-gitignore
- npm.io page: https://npm.io/package/@types/parse-gitignore

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.0.2 (latest) — 2023-11-07
- 1.0.0 (ts3.0) — 2020-07-16
- 1.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/parse-gitignore`

# Summary
This package contains type definitions for parse-gitignore (https://github.com/jonschlinkert/parse-gitignore).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-gitignore.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-gitignore/index.d.ts)
````ts
/// <reference types="node" />

/**
 * Parse a .gitignore or .npmignore file into an array of patterns.
 */
declare function gitignore(input: string | Buffer): string[];

declare namespace gitignore {
    /**
     * Pass the contents of a .gitignore file as a string or buffer
     */
    function parse(input: string | Buffer, fn?: FormatLine): State;

    function format(section: Section): string;

    function stringify(sections: Section[], fn?: typeof format): string;

    interface State {
        patterns: string[];
        sections: Section[];
    }

    interface Section {
        readonly name: string;
        readonly patterns: string[];
    }

    interface FormatLine {
        (line: string, section?: Section, state?: State): string;
    }
}

export = gitignore;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Piotr Błażejewicz](https://github.com/peterblazejewicz).

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