@hurx/gitignore-deserializer
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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!

Dependents (0)

Package Sidebar

Install

npm i @hurx/gitignore-deserializer

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

127 kB

Total Files

19

Last publish

Collaborators

  • shurks