@hurx/gitignore-deserializer
v1.0.1
Published
Check if a path is ignored by git or not by finding the closest .gitignore file in its directory or in its parent directories.
Downloads
1
Maintainers
Readme
Gitignore deserializer
Checks a path to see if it is ignored by any .gitignore files in its directory or its parents directories.
Automatically caches each .gitignore file and uses the cache if the file hasn't been modified since.
Example
import path from 'path'
import Deserializer from '@hurx/gitignore-deserializer'
// Check if a path is ignored
if (Deserializer.isIgnored(path.resolve('node_modules'))) {
// <...>
}
Made with ♥️
Buying me a coffee ☕ contributes to making easy to use and efficient software tools and products for free!