MCPcopy Index your code
hub / github.com/simstudioai/sim / filterUndefined

Function filterUndefined

packages/utils/src/object.ts:22–24  ·  view source on GitHub ↗
(obj: T)

Source from the content-addressed store, hash-verified

20 * Replaces the common `Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined))` pattern.
21 */
22export function filterUndefined<T extends Record<string, unknown>>(obj: T): Partial<T> {
23 return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined)) as Partial<T>
24}
25
26/**
27 * Returns true only for object-map values, excluding arrays and null.

Callers 15

compactBodyFunction · 0.90
jsonBodyFunction · 0.90
create_project.tsFile · 0.90
list_variables.tsFile · 0.90
upsert_variable.tsFile · 0.90
update_project.tsFile · 0.90
delete_variable.tsFile · 0.90
list_projects.tsFile · 0.90
send_message.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected