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