Documentation / @warp-drive/utilities / index / filterEmpty
ts
function filterEmpty(source): Record<string, Serializable>;
Defined in: utilities/src/index.ts:394
filter out keys of an object that have falsy values or point to empty arrays returning a new object with only those keys that have truthy values / non-empty arrays
Parameters
source
Record
<string
, Serializable
>
object to filter keys with empty values from
Returns
Record
<string
, Serializable
>
A new object with the keys that contained empty values removed