Shallow copy an object

JavaScript version
const shallowCopy = obj => Object.assign({}, obj);
// or
const shallowCopy = obj => {...obj};