Test name | Executions per second |
---|---|
Lodash cloneDeep | 1283198.6 Ops/sec |
Spread operator | 6543271.0 Ops/sec |
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
var MyObject = {
description: 'a',
myNumber: 123456789,
myBoolean: true,
};
var myCopy = null;
myCopy = _.cloneDeep(MyObject);
myCopy = {MyObject};