Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

matcher-collection

stefanpenner3.2mISC2.0.1TypeScript support: included

Minimatch but for collections of minimatcher matchers.

readme

MatcherCollection Build Status Build status

Minimatch but for collections of minimatcher matchers.

Install

yarn add matcher-collection

Examples

const MatcherCollection = require('matcher-collection')

const m = new MatcherCollection([
  'tests/',
  '**/*.js',
]);

m.match('tests/foo.js') // => true
m.match('foo.js')       // => false

m.mayContain('tests') // => true
m.mayContain('foo')   // => false