(obj: T)
| 20 | * Replaces the common `Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined))` pattern. |
| 21 | */ |
| 22 | export 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. |
no outgoing calls
no test coverage detected