MCPcopy Create free account
hub / github.com/bvaughn/react-window / debug

Function debug

lib/utils/debug.ts:4–13  ·  view source on GitHub ↗
(namespace: string, ...args: unknown[])

Source from the content-addressed store, hash-verified

2import { stringToColor } from "./colors/stringToColor";
3
4export function debug(namespace: string, ...args: unknown[]) {
5 const backgroundColor = stringToColor(namespace);
6 const color = getContrastColor(backgroundColor);
7
8 console.log(
9 `%c ${namespace} `,
10 `background-color: ${backgroundColor}; color: ${color};`,
11 ...args
12 );
13}

Callers

nothing calls this directly

Calls 2

stringToColorFunction · 0.90
getContrastColorFunction · 0.90

Tested by

no test coverage detected