MCPcopy Create free account
hub / github.com/brillout/react-streaming / isDebugEnabled

Function isDebugEnabled

src/utils/debug.ts:41–49  ·  view source on GitHub ↗
(namespace: string)

Source from the content-addressed store, hash-verified

39}
40
41function isDebugEnabled(namespace: string): boolean {
42 let DEBUG: undefined | string
43 // - `process` can be undefined in edge workers
44 // - We want bundlers to be able to statically replace `process.env.*`
45 try {
46 DEBUG = process.env.DEBUG
47 } catch {}
48 return DEBUG?.includes(namespace) ?? false
49}
50
51function strInfo(info: unknown, options: Options): string | undefined {
52 if (info === undefined) {

Callers 2

debugWithOptionsFunction · 0.85
createDebuggerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…