Skip to content
Ignore common and custom patterns of the file system
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
source
.editorconfig
.eslintrc.js
.gitignore
.npmignore
.travis.yml
CONTRIBUTING.md
HISTORY.md
LICENSE.md
README.md
index.js
package.json

README.md

IgnoreFS

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Slack community badge Patreon donate button Gratipay donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

Ignore common and custom patterns of the file system

Install

NPM

  • Install: npm install --save ignorefs
  • Module: require('ignorefs')

Browserify

  • Install: npm install --save ignorefs
  • Module: require('ignorefs')
  • CDN URL: //wzrd.in/bundle/ignorefs@1.1.1

Ender

  • Install: ender add ignorefs
  • Module: require('ignorefs')

Editions

This package is published with the following editions:

  • ignorefs aliases ignorefs/index.js which uses Editions to automatically select the correct edition for the consumers environment
  • ignorefs/source/index.js is Source + ESNext + Require
  • ignorefs/es2015/index.js is Babel Compiled + ES2015 + Require

Older environments may need Babel's Polyfill or something similar.

Usage

var isIgnored = require('ignorefs').isIgnoredPath(path, {
    ignorePaths: false, // array of paths to ignore
    ignoreHiddenFiles: false, // whether or not we should ignore files that start with a dot
    ignoreCommonPatterns: true, // whether or not we should common patterns like "thumbs.db" etc, uses https://github.com/bevry/ignorepatterns
    ignoreCustomPatterns: false, // can be a regex that is tested against the basename of the file and the file's path
});
console.log(isIgnored);  // true or false

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Patreon donate button Gratipay donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under:

Something went wrong with that request. Please try again.