1 reply
In general, try to avoid filtering out properties from objects, since this opens
your code up for unexpected side-effects.
In most cases you are far better off in return only known properties. And with
ES6 this is really simple to achieve:
({prop1, prop2}) => ({prop1, prop2})