CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-shebang-regex

Regular expression for matching Unix shebang lines at the beginning of files

88

1.54x
Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how effectively the engineer uses the shebang-regex package to extract complete shebang lines from script content. The focus is on proper usage of the package's regex pattern and its exec() method to capture the full shebang line including the #! prefix.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports shebang-regex",
      "description": "Uses require() or import to load the shebang-regex package as a dependency",
      "max_score": 15
    },
    {
      "name": "Uses exec() method",
      "description": "Calls shebangRegex.exec() method on the input content to perform the pattern matching",
      "max_score": 25
    },
    {
      "name": "Extracts full line",
      "description": "Accesses the [0] element of the exec() result to retrieve the complete shebang line including #! prefix",
      "max_score": 30
    },
    {
      "name": "Handles null results",
      "description": "Properly handles the case when exec() returns null (no shebang present) by returning null/undefined or using optional chaining/null checks",
      "max_score": 20
    },
    {
      "name": "Returns correct value",
      "description": "Returns the extracted shebang string when present, or null/undefined when absent, matching the API specification",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-shebang-regex

tile.json