include-exclude-match

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i include-exclude-match

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.33 kB

Total Files

3

Last publish

Collaborators

  • grabantot