showing results for - "javascript object without undefined values"
Sami
18 Feb 2020
1const buildAnObjectFromAQuery = query => (
2  {  
3   ...query.foo && { foo: query.foo },  
4   ...query.bar && { bar: query.bar },
5  }
6);