Extracts a new object containing only the properties with defined (non-undefined) values.
The object to extract from
A new object without undefined values
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 the properties with defined (non-undefined) values.