Wordwrap a string with ANSI escape codes
Overall
score
100%
Build a terminal output formatter that wraps styled text to fit within specific column widths while maintaining all visual styling. The formatter should handle text containing color codes and text decorations commonly used in command-line interfaces.
Your implementation should:
\n) separating linesProvides text wrapping with terminal styling support.
File: formatter.test.js
Input:
Expected behavior:
File: formatter.test.js
Input:
Expected behavior:
File: formatter.test.js
Input:
Expected behavior:
Install with Tessl CLI
npx tessl i tessl/npm-wrap-ansidocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10