Test name | Executions per second |
---|---|
Using the spread operator | 96984704.0 Ops/sec |
Using Object.assign | 41459836.0 Ops/sec |
const firstObject = { moreData: 'foo bar', sampleData: 'Hello world' }
const finalObject = {
firstObject,
};
const firstObject = { moreData: 'foo bar', sampleData: 'Hello world' }
const finalObject = Object.assign({}, firstObject);