MCPcopy Create free account
hub / github.com/arctic-cli/interface / normalizeTargetProviders

Function normalizeTargetProviders

packages/arctic/src/provider/usage.ts:153–162  ·  view source on GitHub ↗
(input?: string | string[])

Source from the content-addressed store, hash-verified

151 }
152
153 function normalizeTargetProviders(input?: string | string[]): string[] | undefined {
154 if (!input) return undefined
155 if (Array.isArray(input)) {
156 return input.filter((id) => typeof id === "string" && id.trim().length > 0)
157 }
158 return input
159 .split(/[\s,]+/)
160 .map((id) => id.trim())
161 .filter((id) => id.length > 0)
162 }
163
164 async function fetchSessionUsage(input: {
165 provider: Provider.Info

Callers 1

fetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected