MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / normalizeParams

Function normalizeParams

packages/tools/src/definitions/render-chart.ts:74–77  ·  view source on GitHub ↗
(raw: unknown)

Source from the content-addressed store, hash-verified

72}
73
74function normalizeParams(raw: unknown): Record<string, unknown> {
75 if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return {}
76 return raw as Record<string, unknown>
77}
78
79function normalizeRows(raw: unknown, maxRows: number): { rows: Record<string, unknown>[]; truncated: boolean } {
80 if (!Array.isArray(raw)) throw new Error('rows must be an array')

Callers 1

handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected