mirror of
https://github.com/github/codeql-action.git
synced 2026-11-09 14:39:58 +00:00
10 lines
237 B
JavaScript
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(), '');
|
|
}
|