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

{
  "context": "This criteria evaluates how well the engineer uses wrap-ansi to handle mixed content containing emoji, ANSI escape codes, and hyperlinks. The focus is on correct usage of wrap-ansi's core function to preserve all formatting elements during text wrapping.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import wrap-ansi",
      "description": "Correctly imports the wrapAnsi function from the wrap-ansi package using require() or ES6 import syntax",
      "max_score": 15
    },
    {
      "name": "Use wrapAnsi function",
      "description": "Calls the wrapAnsi() function with the message string and columns parameter to perform the wrapping operation",
      "max_score": 25
    },
    {
      "name": "Preserve ANSI codes",
      "description": "The implementation correctly preserves ANSI escape codes (colors, styles) in the wrapped output by using wrap-ansi, which automatically maintains these codes across line breaks",
      "max_score": 20
    },
    {
      "name": "Preserve emoji",
      "description": "The implementation correctly handles emoji characters by using wrap-ansi, which properly calculates visual width for Unicode characters including emoji and surrogate pairs",
      "max_score": 20
    },
    {
      "name": "Preserve hyperlinks",
      "description": "The implementation correctly preserves ANSI hyperlinks (OSC 8 sequences) in the wrapped output by using wrap-ansi, which automatically reopens hyperlinks across line breaks",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-wrap-ansi

tile.json