CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-escodegen

ECMAScript code generator that transforms Mozilla's Parser API ASTs back into executable JavaScript code

95

1.07x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This evaluation assesses how effectively the engineer uses the escodegen package to implement a code minifier with number optimization. The focus is on proper usage of escodegen's minification features, particularly the renumber and hexadecimal options for number optimization.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses escodegen.generate",
      "description": "Implementation calls escodegen.generate() or escodegen's generate function to convert AST nodes to JavaScript code",
      "max_score": 20
    },
    {
      "name": "Compact format option",
      "description": "Uses the compact option (format.compact: true or escodegen.FORMAT_MINIFY) to generate code without unnecessary whitespace",
      "max_score": 20
    },
    {
      "name": "Renumber option enabled",
      "description": "Enables the renumber option (format.renumber: true or escodegen.FORMAT_MINIFY) to optimize number representations by removing unnecessary leading zeros and using shorter formats",
      "max_score": 30
    },
    {
      "name": "Hexadecimal option enabled",
      "description": "Enables the hexadecimal option (format.hexadecimal: true or escodegen.FORMAT_MINIFY) to convert large integers to hexadecimal format when it results in shorter code",
      "max_score": 30
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-escodegen

tile.json