@plugjs/plug
Version:
PlugJS Build System ===================
14 lines (13 loc) • 411 B
JavaScript
// utils/ansi.ts
var ansiRegExp = new RegExp([
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
].join("|"), "g");
function stripAnsi(string) {
return string && string.replace(ansiRegExp, "");
}
export {
ansiRegExp,
stripAnsi
};
//# sourceMappingURL=ansi.mjs.map