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
A utility that analyzes glob patterns and provides detailed information about their structure and components.
@generates
/**
* Analyzes a glob pattern and returns its structural information.
*
* @param {string} pattern - The glob pattern to analyze.
* @returns {object} An object containing:
* - isGlob: boolean indicating if pattern contains glob characters
* - base: string of the leading non-glob path portion
* - glob: string of the actual glob pattern portion
* - negated: boolean indicating if pattern starts with '!'
* - isGlobstar: boolean indicating if pattern contains '**'
* - isExtglob: boolean indicating if pattern contains extglob patterns
* - isBrace: boolean indicating if pattern contains brace patterns
*/
function analyzePattern(pattern) {
// IMPLEMENTATION HERE
}
/**
* Parses a glob pattern and returns detailed token information.
*
* @param {string} pattern - The glob pattern to parse.
* @returns {object} A detailed state object containing token array and regex output.
*/
function parsePattern(pattern) {
// IMPLEMENTATION HERE
}
module.exports = {
analyzePattern,
parsePattern,
};Provides glob pattern matching and analysis 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