Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 24, 2024 via pnpm

ignore 5.3.1

Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.
Package summary
Share
0
issues
1
license
1
MIT
Package created
2 Sep 2013
Version published
1 Feb 2024
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ignore@5.3.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ignore 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ignore do?

Ignore is a package implemented in Pure JavaScript which manages, filters and parses according to the .gitignore specification 2.22.1. This package is a go-to for managing and filtering .gitignore rules and is popularly used by several platforms like ESLint, GitBook, and many others. It stands out because it precisely follows the gitignore spec and can filter filenames according to a .gitignore file, providing an effective solution for anyone in need of this functionality.

How do you use ignore?

To use ignore in your projects, installation is done from npm by running the command:

npm i ignore

Here is an example of how to use this package in your code:

Firstly, import ignore from 'ignore' and then initialize ignore and add rules you'll like to use.

import ignore from 'ignore'
const ig = ignore().add(['.abc/*', '!.abc/d/'])

// Adding rules to ignore
const paths = [
  '.abc/a.js',    // filtered out
  '.abc/d/e.js'   // included
]

// Using the filter() function on your paths
ig.filter(paths)        // ['.abc/d/e.js']

// Verifying if a file will be ignored
ig.ignores('.abc/a.js') // true

You can also use ignore as a filter function for your paths:

 paths.filter(ig.createFilter()); // ['.abc/d/e.js']

Ignore handles win32 paths as such:

ig.filter(['.abc\\a.js', '.abc\\d\\e.js'])
// if the code above runs on windows, the result will be
// ['.abc\\d\\e.js']

Where are the ignore docs?

To access the documentation for ignore, you can find it in the readme of the repository at https://github.com/kaelzhang/node-ignore. It provides a comprehensive and detailed guide on how to use the package, its methods, options, upgrade guide, and collaborators. Please note that the accurate usage of ignore follows the gitignore specification 2.22.1.