Convert globs to regular expressions
Overall
score
100%
{
"context": "This criteria evaluates how well the engineer uses the glob-to-regexp package to implement file name pattern matching, specifically focusing on the use of curly brace alternation syntax with the extended option.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import glob-to-regexp",
"description": "The solution imports or requires the glob-to-regexp package (e.g., `const globToRegExp = require('glob-to-regexp')` or similar).",
"max_score": 15
},
{
"name": "Use extended option",
"description": "The solution calls globToRegExp with the `extended: true` option to enable curly brace alternation syntax (e.g., `globToRegExp(pattern, {extended: true})`).",
"max_score": 35
},
{
"name": "Convert pattern to RegExp",
"description": "The solution uses globToRegExp to convert the pattern string into a RegExp object that can be used for matching.",
"max_score": 25
},
{
"name": "Test against fileName",
"description": "The solution uses the resulting RegExp object to test the fileName parameter (e.g., using `.test()` method) and returns the appropriate boolean result.",
"max_score": 25
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-glob-to-regexpdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9