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-3/

{
  "context": "This criteria evaluates how well the engineer uses the glob-to-regexp package to implement pattern matching with character ranges. The focus is on proper usage of the extended mode option and understanding of how character class patterns are converted to regular expressions.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import glob-to-regexp",
      "description": "Correctly imports or requires the glob-to-regexp package",
      "max_score": 10
    },
    {
      "name": "Extended mode enabled",
      "description": "Calls globToRegExp with {extended: true} option to enable character class support, which is required for [] patterns to work",
      "max_score": 25
    },
    {
      "name": "Pattern conversion",
      "description": "Uses globToRegExp function to convert the glob pattern string into a RegExp object",
      "max_score": 20
    },
    {
      "name": "Regex testing",
      "description": "Uses the RegExp.test() method or equivalent regex matching to check if the filename matches the pattern",
      "max_score": 20
    },
    {
      "name": "Correct return values",
      "description": "Returns boolean values (true/false) based on whether the filename matches the pattern",
      "max_score": 15
    },
    {
      "name": "Handle all test cases",
      "description": "Implementation correctly handles digit ranges [0-9], letter ranges [a-z] and [A-Z], combined patterns with wildcards, and multiple character classes",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json