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

{
  "context": "This criteria evaluates how well the engineer uses the glob-to-regexp package's character range matching feature ([] syntax with extended mode) to implement pattern validation. The focus is on correct usage of the package API, particularly enabling extended mode and utilizing character class patterns.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports glob-to-regexp",
      "description": "Code imports or requires the glob-to-regexp package (e.g., `const globToRegExp = require('glob-to-regexp')` or `import globToRegExp from 'glob-to-regexp'`)",
      "max_score": 10
    },
    {
      "name": "Enables extended mode",
      "description": "Code passes the `{extended: true}` option when calling globToRegExp to enable character range matching with [] syntax",
      "max_score": 30
    },
    {
      "name": "Calls globToRegExp function",
      "description": "Code invokes the globToRegExp function with the pattern parameter to convert glob patterns to RegExp objects",
      "max_score": 20
    },
    {
      "name": "Uses returned RegExp",
      "description": "Code uses the RegExp object returned by globToRegExp to test strings (e.g., using .test() method or other regex matching operations)",
      "max_score": 20
    },
    {
      "name": "Correct return value",
      "description": "Function returns boolean values (true/false) based on whether the test string matches the pattern, as specified in the API",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

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

tile.json