Function
normalizeTargetProviders
(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 |
Tested by
no test coverage detected