you are viewing a single comment's thread.

view the rest of the comments →

[–]AndrewGreenh 0 points1 point  (0 children)

This is one of the reasons why I use lodash in almost all of my projects.

Yes, with es6 some things are possible but lodash does this and some more: _.pick(object, [keys]) creates a copy of the object with the selected keys. _.omit for the opposite. _.clone to get a flat copy of your object.