package
find the closest .gitignore file, parse it, and apply ignore rules
npm install dotgitignoreGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
find the closest .gitignore file, parse it, and apply ignore rules.
Given the following .gitignore:
.DS_Store
node_modules
coverage
.nyc_outputconst dotgit = require('dotgitignore')()
dotgit.ignore('.DS_Store') // returns 'true'.
dotgit.ignore('README.md') // returns 'false'.require('dotgitignore')([opts]): return instance of dotgitignore, optionally
configured with opts:
opts.cwd: current working directory (defaults to process.cwd()).dotgit.ignore(name): returns true if pattern is ignored, false otherwise.