1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.colors = exports.removeColor = exports.supportsColor = void 0;
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | const ansiColors = require("ansi-colors");
|
12 | const tty_1 = require("tty");
|
13 |
|
14 | exports.supportsColor = process.stdout instanceof tty_1.WriteStream &&
|
15 | process.stdout.getColorDepth() > 1;
|
16 | function removeColor(text) {
|
17 | return text.replace(new RegExp(ansiColors.ansiRegex), '');
|
18 | }
|
19 | exports.removeColor = removeColor;
|
20 |
|
21 |
|
22 | const colors = ansiColors.create();
|
23 | exports.colors = colors;
|
24 | colors.enabled = exports.supportsColor;
|