MCPcopy Create free account
hub / github.com/Snapchat/Valdi / removeUndefined

Function removeUndefined

valdi/vscode_debugger/src/common/objUtils.ts:8–9  ·  view source on GitHub ↗
(obj: { [key: string]: V | undefined })

Source from the content-addressed store, hash-verified

6 filterValues(obj, (v): v is V => v !== null);
7
8export const removeUndefined = <V>(obj: { [key: string]: V | undefined }) =>
9 filterValues(obj, (v): v is V => v !== undefined);
10
11/**
12 * Asserts that the value is never. If this function is reached, it throws.

Callers 1

constructorMethod · 0.90

Calls 1

filterValuesFunction · 0.85

Tested by

no test coverage detected