feature: add filterObjecNullKeys helper function
This commit is contained in:
parent
6c1a64efc1
commit
cbb8c60fc9
|
@ -0,0 +1,8 @@
|
|||
// @flow
|
||||
export default (obj: Object) => Object.keys(obj).reduce((acc, cur) => {
|
||||
if (obj[cur] === null || obj[cur] === undefined || obj[cur] === '') {
|
||||
return acc;
|
||||
}
|
||||
|
||||
return { ...acc, [cur]: obj[cur] };
|
||||
}, {});
|
Loading…
Reference in New Issue