MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / removeUndefined

Function removeUndefined

src/utils/remove-undefined.ts:1–9  ·  view source on GitHub ↗
(input: T)

Source from the content-addressed store, hash-verified

1export function removeUndefined<T extends Record<string, unknown>>(input: T): Partial<T> {
2 const result: Partial<T> = {};
3 for (const [key, value] of Object.entries(input)) {
4 if (value !== undefined) {
5 result[key as keyof T] = value as T[keyof T];
6 }
7 }
8 return result;
9}

Calls

no outgoing calls

Tested by

no test coverage detected