1.0.1 • Published 1 year ago

@hurx/gitignore-deserializer v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Gitignore deserializer

by Hurx (Stan Hurks) 📧

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!