Extracts a new object containing only safe properties with non-nullish values.
The object to extract from
A new object without nullish values or unsafe keys
const clean = ifDefined({ a: 1, b: undefined }); // { a: 1 } Copy
const clean = ifDefined({ a: 1, b: undefined }); // { a: 1 }
Extracts a new object containing only safe properties with non-nullish values.