MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / normalizeMaxRows

Function normalizeMaxRows

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

Source from the content-addressed store, hash-verified

86}
87
88function normalizeMaxRows(raw: unknown): number {
89 const value = typeof raw === 'number' ? raw : DEFAULT_MAX_ROWS
90 if (!Number.isFinite(value)) return DEFAULT_MAX_ROWS
91 return Math.min(5000, Math.max(1, Math.floor(value)))
92}
93
94function summarizeChart(type: string, title: string, rowCount: number, truncated: boolean, locale?: string): string {
95 if (locale?.startsWith('zh')) {

Callers 1

handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected