1.0.0 • Published 6 years ago

include-exclude-match v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

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