MCPcopy Create free account
hub / github.com/Snapchat/Valdi / wrapInColor

Function wrapInColor

npm_modules/cli/src/utils/logUtils.ts:3–9  ·  view source on GitHub ↗
(
  s: string | undefined,
  color: Constants.ANSI_COLORS,
  reset_color: Constants.ANSI_COLORS = Constants.ANSI_COLORS.RESET_COLOR,
)

Source from the content-addressed store, hash-verified

1import * as Constants from '../core/constants';
2
3export function wrapInColor(
4 s: string | undefined,
5 color: Constants.ANSI_COLORS,
6 reset_color: Constants.ANSI_COLORS = Constants.ANSI_COLORS.RESET_COLOR,
7): string {
8 return `${color}${s ?? ''}${reset_color}`;
9}

Callers 15

maybeSetupPrettierFunction · 0.90
maybeSetupEslintFunction · 0.90
printStatusFunction · 0.90
copyBootstrapFilesFunction · 0.90
makeArgsBuilderFunction · 0.90
selectBazelTargetFunction · 0.90
logReproduceWithFunction · 0.90
commandFunction · 0.90
getDeviceChoiceFunction · 0.90
runCommandMethod · 0.90
spawnCommandMethod · 0.90
runDiagnosticsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected