Convert globs to regular expressions
Overall
score
100%
{
"context": "This criteria evaluates how well the engineer uses the glob-to-regexp package's flags option to implement case-insensitive and global/unanchored pattern matching. The focus is on proper usage of the 'i' flag for case-insensitive matching and the 'g' flag for unanchored/global matching.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import glob-to-regexp",
"description": "Correctly imports or requires the globToRegExp function from the glob-to-regexp package",
"max_score": 10
},
{
"name": "Use flags option",
"description": "Passes a flags option to globToRegExp when creating the regular expression",
"max_score": 20
},
{
"name": "Case-insensitive flag",
"description": "Uses the 'i' flag in the flags option when caseSensitive is false to enable case-insensitive matching",
"max_score": 25
},
{
"name": "Global/unanchored flag",
"description": "Uses the 'g' flag in the flags option when matchAnywhere is true to enable unanchored matching",
"max_score": 25
},
{
"name": "Combine flags",
"description": "Correctly combines multiple flags (e.g., 'gi' or 'ig') when both options are enabled",
"max_score": 20
}
]
}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