A tiny and fast text wrap library which takes ANSI escapes into account.
npm install fast-wrap-ansiWordwrap a string, taking ANSI escape codes into account.
A fast, light fork of the wrap-ansi package.
``bash`
npm i -S fast-wrap-ansi
`ts
import {wrapAnsi} from 'fast-wrap-ansi';
const str = 'This is a string with some \x1b[31mANSI\x1b[39m codes.';
const wrapped = wrapAnsi(str, 20);
console.log(wrapped);
``
MIT