ES6 Hapus properti kosong dari objek

Object.entries(obj).reduce((a,[k,v]) => (v == null ? a : (a[k]=v, a)), {})
Magnificent Moth