CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-wrap-ansi

Wordwrap a string with ANSI escape codes

Overall
score

100%

Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how well the engineer uses wrap-ansi's hard wrapping optimization algorithm to minimize line breaks when wrapping text with long words that must be split across multiple lines.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses wrap-ansi package",
      "description": "Implementation imports and uses the wrap-ansi package (typically imported as wrapAnsi or similar from 'wrap-ansi')",
      "max_score": 20
    },
    {
      "name": "Enables hard wrapping",
      "description": "Calls wrapAnsi with the { hard: true } option to enable hard wrapping mode, which forces word breaks at column width",
      "max_score": 25
    },
    {
      "name": "Passes correct parameters",
      "description": "Correctly passes the input string as first parameter and the width/columns value as second parameter to wrapAnsi",
      "max_score": 15
    },
    {
      "name": "Leverages optimization algorithm",
      "description": "Relies on wrap-ansi's built-in optimization algorithm to automatically minimize line breaks (doesn't implement custom break calculation logic)",
      "max_score": 25
    },
    {
      "name": "Returns wrapped output",
      "description": "Returns or outputs the result from wrapAnsi, which contains the optimally wrapped text with newlines",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-wrap-ansi

tile.json