1.0.0 • Published 6 months ago

pear-ignore v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

Pear-ignore

Small utility for filtering file paths based on inclusion and exclusion patterns.

Installation

npm i pear-ignore
const ignore = require('pear-ignore')

const ignores = [
  'node_modules',
  'folder/*.js',
  'a/b/*'
]

const ignored = ignore(ignores)
ignored('/node_modules') // true
ignored('/a/b.txt') // false
ignored('/a/b/c') // true
ignored('/folder/index.js') // true
ignored('/folder/file.txt') // false
1.0.0

6 months ago