Socket
Book a DemoInstallSign in
Socket

file-ignore-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-ignore-parser

Parse ignore files (.gitignore and .npmignore)

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

file-ignore-parser

version Maintenance MIT

Parse ignore files (.gitignore and .npmignore)

Requirements

  • Node.js v10 or higher

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i file-ignore-parser
# or
$ yarn add file-ignore-parser

Usage example

const parser = require("file-ignore-parser");

parser(".gitignore").then(console.log).catch(console.error);

If you want an Array you can convert the Set with Array.from()

API

parser(location: string): Promise< Set< string > >

Parse a given file and return a Set of unique string.

License

MIT

Keywords

file

FAQs

Package last updated on 19 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts