MCPcopy Create free account
hub / github.com/code-pushup/cli / removeUndefinedAndEmptyProps

Function removeUndefinedAndEmptyProps

packages/utils/src/lib/transform.ts:169–175  ·  view source on GitHub ↗
(obj: T)

Source from the content-addressed store, hash-verified

167}
168
169export function removeUndefinedAndEmptyProps<T extends object>(obj: T): T {
170 return Object.fromEntries(
171 Object.entries(obj).filter(
172 ([, value]) => value !== undefined && value !== '',
173 ),
174 ) as T;
175}

Callers 2

sanitizeOptionsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected