MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / omitUndefined

Function omitUndefined

packages/codex-native-api/src/native_api_server.ts:3079–3083  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

3077}
3078
3079function omitUndefined<T extends JsonRecord>(value: T): T {
3080 return Object.fromEntries(
3081 Object.entries(value).filter(([, entry]) => entry !== undefined),
3082 ) as T;
3083}
3084
3085function cloneJson<T>(value: T): T {
3086 return JSON.parse(JSON.stringify(value)) as T;

Calls

no outgoing calls

Tested by

no test coverage detected