javascript object without undefined values code example
Example: javascript object without undefined values
const buildAnObjectFromAQuery = query => (
{
...query.foo && { foo: query.foo },
...query.bar && { bar: query.bar },
}
);
const buildAnObjectFromAQuery = query => (
{
...query.foo && { foo: query.foo },
...query.bar && { bar: query.bar },
}
);