Files
discord-clone/node_modules/strip-ansi/index.js
2023-01-03 09:29:04 -06:00

10 lines
237 B
JavaScript

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(), '');
}