Check if a string matches a wildcard pattern.
module.exports = (test, pattern) => { return new RegExp(test.replace(/\*/g, '([^*]+)'), 'g').test(pattern); };