MCPcopy Index your code
hub / github.com/callstack/agent-device / uniqueNonEmpty

Function uniqueNonEmpty

src/platforms/android/sdk.ts:12–22  ·  view source on GitHub ↗
(values: readonly string[])

Source from the content-addressed store, hash-verified

10] as const;
11
12function uniqueNonEmpty(values: readonly string[]): string[] {
13 const seen = new Set<string>();
14 const normalized: string[] = [];
15 for (const value of values) {
16 const trimmed = value.trim();
17 if (!trimmed || seen.has(trimmed)) continue;
18 seen.add(trimmed);
19 normalized.push(trimmed);
20 }
21 return normalized;
22}
23
24export function resolveAndroidSdkRoots(env: NodeJS.ProcessEnv = process.env): string[] {
25 const configuredRoot = env.ANDROID_SDK_ROOT?.trim();

Callers 2

resolveAndroidSdkRootsFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected