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

Package detail

include-exclude-match

grabantot2ISC1.0.0

Verify that a string matches one of include-regexps and doesn't match any of exclude-regexps

include, exclude, match, pattern, string, regex, regexp, regular expression

readme

include-exclude-match

Verify that a string matches one of include-regexps and doesn't match any of exclude-regexps

Usage

match(value, include, exclude)

const match = require('include-exclude-match')
match('banana', [/.*/], [/apple/, /orange/]) // true
match('caterpilar', [/cat/, /dog/], [/caterpilar/]) // false