MCPcopy Index your code
hub / github.com/angular/angular-cli / supportColor

Function supportColor

packages/angular/cli/src/utilities/color.ts:13–24  ·  view source on GitHub ↗
(stream: NodeJS.WritableStream = process.stdout)

Source from the content-addressed store, hash-verified

11export { color as colors, figures } from 'listr2';
12
13export function supportColor(stream: NodeJS.WritableStream = process.stdout): boolean {
14 if (stream instanceof WriteStream) {
15 return stream.hasColors();
16 }
17
18 try {
19 // The hasColors function does not rely on any instance state and should ideally be static
20 return WriteStream.prototype.hasColors();
21 } catch {
22 return process.env['FORCE_COLOR'] !== undefined && process.env['FORCE_COLOR'] !== '0';
23 }
24}

Callers 1

index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected