chalk / wrap-ansi

Wordwrap a string with ANSI escape codes
MIT License
120 stars 25 forks source link

Option to disable word-wrapping #12

Closed SamVerschueren closed 7 years ago

SamVerschueren commented 8 years ago

In log-update, we want to use this library to count the number of lines of the output depending on the width of the terminal. But because of the word wrapping, this is currently unusable.

Current behaviour with wrap-ansi of 35 columns.

[1] 0.9565833098848577 ~ 0.1412900921566833 [2] 0.8579648462764315

With setting a word-wrap flag (wordWrap or something) to false, it should become

[1] 0.9565833098848577 ~ 0.1412900 921566833 [2] 0.8579648462764315