Returns a new object with ALL object properties with falsy values removed.
npm install only-truthy
import onlyTruthy from 'only-truthy';
const obj = onlyTruthy({
a: true,
b: false,
c: null,
d: undefined,
e: NaN,
f: '',
g: 0,
});
console.log(obj);
// => { a: true };