1234567891011121314 |
- import ansiRegex from 'ansi-regex';
- const regex = ansiRegex();
- export default function stripAnsi(string) {
- if (typeof string !== 'string') {
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
- }
-
-
-
- return string.replace(regex, '');
- }
|