evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A utility that analyzes glob patterns and provides detailed information about their structure and components.
/**
* 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.