word-wrap
word-wrap copied to clipboard
Bug: it counts ansii colour info as part of width resulting in wrong wrapping
wrap(chalk`{green this} {red is} a long string {bold to be} {yellow wrapped}`,5);
will not wrap corretly because it is including ansi color info as part of the string.
We could employ https://www.npmjs.com/package/strip-ansi to help with this perhaps?