docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
Build a utility function that filters arrays of file paths based on glob patterns.
Create a function filterPaths(paths, patterns) that:
paths) and one or more glob patterns (patterns)The function should support standard glob pattern syntax including:
*) for matching within path segments**) for matching across directory levels?) for single character matching[abc], [0-9]).js files @test/**
* Filters an array of file paths based on glob patterns.
*
* @param {string[]} paths - Array of file path strings to filter
* @param {string|string[]} patterns - Glob pattern(s) to match against
* @returns {string[]} Array of paths that match the pattern(s)
*/
function filterPaths(paths, patterns) {
// IMPLEMENTATION HERE
}
module.exports = { filterPaths };Provides glob pattern matching for JavaScript.