frontend/.pnpm-store/v3/files/0a/8d8d220059f7fc6abd6f35e863d02b5d6a79ea4b36aab828010daa3152fd81ca5c00fe18f50600ba5f6f00d56ab2186934cc86b47195097892d56d4c6f2362

10 lines
237 B
Plaintext

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