matchGlob(pattern, str)
Tests if a single string matches a glob pattern.
Parameters:
pattern(string) – Glob pattern.str(string) – String to test.
Returns:
boolean – true if the string matches the pattern.
Example:
1console.log(micromatch.matchGlob("*.js", "index.js")); // true2console.log(micromatch.matchGlob("*.js", "style.css")); // false