CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-escape-string-regexp

Escape RegExp special characters in strings for safe use in regular expressions

100

1.00x
Quality

Pending

Does it follow best practices?

Impact

100%

1.00x

Average score across 7 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-5/

{
  "context": "This criteria evaluates how effectively the engineer uses the escape-string-regexp package to safely escape regex special characters while preserving Unicode and international characters in a search filter implementation.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses escape-string-regexp",
      "description": "The implementation imports and correctly uses the escapeStringRegexp function (or default export) from the escape-string-regexp package to escape the input query string",
      "max_score": 30
    },
    {
      "name": "Unicode preservation",
      "description": "The implementation correctly preserves Unicode characters (emojis, accented characters, non-Latin scripts) by relying on escape-string-regexp's minimal escaping strategy, which only escapes regex-special characters and leaves Unicode characters unmodified",
      "max_score": 25
    },
    {
      "name": "RegExp construction",
      "description": "The escaped string from escape-string-regexp is correctly passed to the RegExp constructor (or used in a regex literal) with appropriate flags (global 'g' and case-insensitive 'i')",
      "max_score": 25
    },
    {
      "name": "Input validation",
      "description": "The implementation validates that the input is a string before processing, throwing an appropriate error for non-string inputs (this may rely on escape-string-regexp's built-in type checking or be implemented separately)",
      "max_score": 20
    }
  ]
}

tile.json