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

{
  "context": "This criteria evaluates how effectively the engineer uses the glob-to-regexp package to implement file path matching with basic wildcard (*) support. The focus is on proper usage of the globToRegExp function to convert glob patterns into regular expressions for pattern matching.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports glob-to-regexp",
      "description": "The solution imports or requires the glob-to-regexp package using require() or import statement",
      "max_score": 15
    },
    {
      "name": "Uses globToRegExp function",
      "description": "The solution calls the globToRegExp function to convert the pattern string into a regular expression",
      "max_score": 30
    },
    {
      "name": "Tests paths with regex",
      "description": "The solution uses the RegExp.test() method or similar regex matching to check if each path matches the pattern",
      "max_score": 25
    },
    {
      "name": "Correct pattern conversion",
      "description": "The solution passes the pattern string directly to globToRegExp without unnecessary modifications, allowing the package to handle the * wildcard conversion",
      "max_score": 20
    },
    {
      "name": "Functional correctness",
      "description": "The solution correctly filters paths and returns only those matching the pattern, preserving order and handling edge cases like no matches",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json