MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / isPageValid

Function isPageValid

apps/web/services/ssr/channels.ts:188–195  ·  view source on GitHub ↗
(page: string, pages: number | null)

Source from the content-addressed store, hash-verified

186}
187
188function isPageValid(page: string, pages: number | null) {
189 if (!pages) return false;
190 if (!page) return false;
191
192 const validation = z.coerce.number().positive().lte(pages);
193 const result = validation.safeParse(page);
194 return result.success;
195}
196
197function parsePage(page: string): number | undefined {
198 try {

Callers 1

isPageNotValidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected