I want to propose Glob to match glob patterns. The idea is to have the same API of RegExp:
const path = 'example/file.js' const glob = new Glob('**/*.js') console.log(glob.test(path)) // true
This will be useful for many JS libs that provide their configuration in Glob because is easier to read than regex. Right now all these libs have to do all the conversions from glob to regex adding extra size in their bundles.