CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-glob-to-regexp

Convert globs to regular expressions

Overall
score

100%

Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how well the engineer uses the glob-to-regexp package to implement pattern matching with different matching modes (anchored vs global). The focus is on correct usage of the flags option to control whether patterns match entire strings or substrings.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import glob-to-regexp",
      "description": "The solution imports or requires the glob-to-regexp package (typically imported as 'globToRegexp' or similar)",
      "max_score": 10
    },
    {
      "name": "Exact matching implementation",
      "description": "The createExactMatcher function uses globToRegexp() without the flags option (or with default/empty flags) to create anchored patterns that match entire strings from start to end",
      "max_score": 25
    },
    {
      "name": "Substring matching implementation",
      "description": "The createSubstringMatcher function uses globToRegexp() with the {flags: 'g'} option to create unanchored patterns that match substrings anywhere in the input",
      "max_score": 25
    },
    {
      "name": "RegExp usage",
      "description": "The solution correctly uses the RegExp objects returned by globToRegexp() to test strings (e.g., using .test() method or similar)",
      "max_score": 20
    },
    {
      "name": "Filter function correctness",
      "description": "The filterPaths function correctly delegates to the appropriate matcher (exact or substring) based on the mode parameter and properly filters the input array",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-glob-to-regexp

tile.json