Wordwrap a string with ANSI escape codes
Overall
score
100%
Multiple ANSI escape sequence type support
Uses wrap-ansi
100%
100%
Correct function signature
100%
100%
Plain text wrapping
100%
100%
SGR code preservation
100%
100%
OSC 8 hyperlink preservation
100%
100%
Mixed escape sequences
100%
100%
ANSI escape code preservation during wrapping
Uses wrapAnsi function
100%
100%
Passes required parameters
100%
100%
ANSI code preservation
100%
100%
Hard wrapping option
100%
100%
Handles wrapped output
100%
100%
Test case coverage
100%
100%
Basic text wrapping to specified column width
Uses wrapAnsi function
100%
100%
Passes text parameter
100%
100%
Passes columns parameter
100%
100%
Handles plain text
100%
100%
Handles ANSI codes
100%
100%
Returns wrapped output
100%
100%
Nested ANSI codes within hyperlinks
Uses wrapAnsi function
100%
100%
Correct function signature
100%
100%
Hyperlink preservation
100%
100%
Nested style handling
100%
100%
Minimal custom logic
100%
100%
Whitespace trimming on wrapped lines
Uses wrapAnsi function
100%
100%
Passes columns parameter
100%
100%
Uses trim option
100%
100%
Maps preserveWhitespace parameter
100%
100%
Handles default behavior
100%
100%
Returns wrapped result
100%
100%
No reimplementation
100%
100%
Configuration via trim option
Uses wrapAnsi function
100%
100%
Implements clean mode
100%
100%
Implements preserve mode
100%
100%
Maps options correctly
100%
100%
Passes columns parameter
100%
100%
Returns wrapped result
100%
100%
Mixed content handling (emoji + ANSI + hyperlinks)
Import wrap-ansi
100%
100%
Use wrapAnsi function
100%
100%
Preserve ANSI codes
100%
100%
Preserve emoji
100%
100%
Preserve hyperlinks
100%
100%
Visual width calculation ignoring ANSI codes
Uses wrapAnsi function
100%
100%
Passes column width
100%
100%
Handles hard wrapping
100%
100%
Preserves ANSI codes
100%
100%
Returns wrapped string
100%
100%
Edge case handling for whitespace-only input
Uses wrapAnsi function
100%
100%
Passes trim option
100%
100%
Handles trim enabled
100%
100%
Handles trim disabled
100%
100%
Correct parameter order
100%
100%
Hard wrapping optimization algorithm
Uses wrap-ansi package
100%
100%
Enables hard wrapping
100%
100%
Passes correct parameters
100%
100%
Leverages optimization algorithm
0%
100%
Returns wrapped output
0%
100%
Install with Tessl CLI
npx tessl i tessl/npm-wrap-ansiTable of Contents