MCPcopy Index your code
hub / github.com/callstack/agent-device / supportsColor

Function supportsColor

src/utils/output.ts:596–605  ·  view source on GitHub ↗
(stream: { isTTY?: boolean } = process.stdout)

Source from the content-addressed store, hash-verified

594}
595
596export function supportsColor(stream: { isTTY?: boolean } = process.stdout): boolean {
597 const forceColor = process.env.FORCE_COLOR;
598 if (typeof forceColor === 'string') {
599 return forceColor !== '0';
600 }
601 if (typeof process.env.NO_COLOR === 'string') {
602 return false;
603 }
604 return Boolean(stream.isTTY);
605}
606
607export function colorize(
608 text: string,

Callers 8

formatCliStatusMarkerFunction · 0.90
renderProxyStartupFunction · 0.90
replayFlakyStatusIconFunction · 0.90
formatSnapshotDiffTextFunction · 0.85
formatScreenshotDiffTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected