MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / dropUndefinedKeys

Function dropUndefinedKeys

packages/core/src/utils/object.ts:187–195  ·  view source on GitHub ↗
(inputValue: T)

Source from the content-addressed store, hash-verified

185 * @deprecated This function is no longer used by the SDK and will be removed in a future major version.
186 */
187export function dropUndefinedKeys<T>(inputValue: T): T {
188 // This map keeps track of what already visited nodes map to.
189 // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular
190 // references as the input object.
191 const memoizationMap = new Map<unknown, unknown>();
192
193 // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API
194 return _dropUndefinedKeys(inputValue, memoizationMap);
195}
196
197function _dropUndefinedKeys<T>(inputValue: T, memoizationMap: Map<unknown, unknown>): T {
198 // Early return for primitive values

Callers 1

object.test.tsFile · 0.90

Calls 1

_dropUndefinedKeysFunction · 0.85

Tested by

no test coverage detected