# 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).
