MCPcopy Create free account
hub / github.com/simstudioai/sim / parseMaxNotes

Function parseMaxNotes

apps/sim/connectors/granola/granola.ts:107–112  ·  view source on GitHub ↗

* Parses the optional `maxNotes` cap from source config. * Returns 0 (unlimited) when unset or invalid.

(sourceConfig: Record<string, unknown>)

Source from the content-addressed store, hash-verified

105 * Returns 0 (unlimited) when unset or invalid.
106 */
107function parseMaxNotes(sourceConfig: Record<string, unknown>): number {
108 const raw = sourceConfig.maxNotes
109 if (raw == null || raw === '') return 0
110 const num = Number(raw)
111 return Number.isFinite(num) && num > 0 ? Math.floor(num) : 0
112}
113
114/**
115 * Parses the optional `folderId` scope from source config. Returns a trimmed

Callers 1

granola.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected