assignProperties
An Object.assign like utility that preserve descriptors, as in accessors or value, or configurable, or writable, etc.
import assignProperties from 'assign-properties';
const assignProperties = require('assign-properties');
const before = Object.assign({}, {get random() { return Math.random() }});
before.random === before.random;
const after = assignProperties({}, {get random() { return Math.random() }});
after.random === after.random;
Object spread suffers the same issue
const base = {get random() { return Math.random() }};
const spread = {...base};
spread.random === spread.random;
So, if you want to bring accessors to the mix, this module is your stop.