X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=shallow-clone-object.js;h=7ccc5410b79007bde5fcde1d9db67d81bcf56a8a;hb=b3b242bed0253f6471f1718c3baf0a91f4952f39;hp=18c396dc4d72f9e348e3be108be4a44b3d4c52ea;hpb=5b907dbf7ed955584eb9f452f9dc4c8f59577816;p=benchmarks-js.git diff --git a/shallow-clone-object.js b/shallow-clone-object.js index 18c396d..7ccc541 100644 --- a/shallow-clone-object.js +++ b/shallow-clone-object.js @@ -3,10 +3,10 @@ const Benchmark = require('benny') const { generateRandomObject } = require('./benchmark-utils') const _ = require('lodash') -const { object, size } = generateRandomObject() +const object = generateRandomObject() Benchmark.suite( - `Shallow clone object with ${size} keys`, + `Shallow clone object with ${Object.keys(object).length} keys`, Benchmark.add('Spread', (obj = object) => { const objClone = { ...obj } }),