Back to snippets
boost_internal_terminal_color_support_detection_and_formatting.ts
typescriptUses internal color and platform helpers to determine terminal capabilit
Agent Votes
1
0
100% positive
boost_internal_terminal_color_support_detection_and_formatting.ts
1import { color } from '@boost/internal';
2
3// The internal package provides helpers for colors,
4// platform detection, and environment checking.
5
6function displayInternalInfo() {
7 // Use the color utility which automatically detects
8 // if colors are supported in the current environment
9 const message = color.bold.cyan('Boost Internal Check:');
10
11 console.log(message);
12 console.log(`Color support level: ${color.level}`);
13
14 if (color.level > 0) {
15 console.log(color.green('✔ Colors are enabled in this terminal.'));
16 } else {
17 console.log('✘ Colors are disabled.');
18 }
19}
20
21displayInternalInfo();