MCPcopy Create free account
hub / github.com/pollinations/pollinations / parseGithubIdList

Function parseGithubIdList

shared/auth/github-id-list.ts:47–57  ·  view source on GitHub ↗
(raw: string | undefined | null)

Source from the content-addressed store, hash-verified

45 * instead of being silently truncated to 123.
46 */
47export function parseGithubIdList(raw: string | undefined | null): Set<number> {
48 if (!raw) return new Set();
49 const ids = new Set<number>();
50 for (const part of raw.split(",")) {
51 const trimmed = part.trim();
52 if (!/^\d+$/.test(trimmed)) continue;
53 const n = Number(trimmed);
54 if (n > 0) ids.add(n);
55 }
56 return ids;
57}

Callers 2

assertStagingAccessFunction · 0.90

Calls 1

addMethod · 0.80

Tested by

no test coverage detected