MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / collectStringEntries

Function collectStringEntries

apps/api/src/lib/ai/ai.utils.ts:6–18  ·  view source on GitHub ↗
(
  obj: Record<string, unknown>
)

Source from the content-addressed store, hash-verified

4 value !== null && typeof value === "object" && !Array.isArray(value);
5
6const collectStringEntries = (
7 obj: Record<string, unknown>
8): Record<string, string> => {
9 const out: Record<string, string> = {};
10
11 for (const [key, value] of Object.entries(obj)) {
12 if (typeof value === "string") {
13 out[key] = value;
14 }
15 }
16
17 return out;
18};
19
20const warnInvalid = (reason: string): void => {
21 logger.warn(`OPENAI_DEFAULT_HEADERS ${reason} — ignoring`, {

Callers 1

parseDefaultHeadersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected