Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
83
Build a pattern matching utility that supports custom numeric range expansion in glob patterns.
Your utility should:
{start..end}{1..3} expands to match "01", "02", "03")The matcher should:
file{1..5}.txt which should match files like "file01.txt", "file02.txt", through "file05.txt"logs/session{10..12}/data.log)*, ?) in combination with custom ranges@generates
/**
* Creates a matcher function with custom range expansion support.
*
* @param {string} pattern - A glob pattern that may contain numeric ranges like {start..end}
* @returns {Function} A function that tests if a string matches the pattern
*/
function createMatcher(pattern) {
// Implementation
}
module.exports = { createMatcher };Provides glob pattern matching capabilities.
Install with Tessl CLI
npx tessl i tessl/npm-picomatchevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10