removes all ansi colour codes from a string.
the text to strip colours from
the text with all ansi escape sequences removed
const plainText = stripColours('\x1b[31mred text\x1b[0m');console.log(plainText); // "red text" Copy
const plainText = stripColours('\x1b[31mred text\x1b[0m');console.log(plainText); // "red text"
removes all ansi colour codes from a string.