mirror of https://github.com/hashicorp/consul
10 lines
246 B
JavaScript
10 lines
246 B
JavaScript
|
export default function(obj) {
|
||
|
// non-recursive for the moment
|
||
|
return Object.keys(obj).reduce(function(prev, item, i, arr) {
|
||
|
if (obj[item] !== null) {
|
||
|
return { ...prev, ...{ [item]: obj[item] } };
|
||
|
}
|
||
|
return prev;
|
||
|
}, {});
|
||
|
}
|