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