repositories
/
benchmarks-js.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply dependencies update
[benchmarks-js.git]
/
deep-clone-object.js
diff --git
a/deep-clone-object.js
b/deep-clone-object.js
index e1d8b1c61fac3860a09cc13d145fd58a250b7c24..056e1dedea871edf687fb3ee5cfea6729a3444ee 100644
(file)
--- a/
deep-clone-object.js
+++ b/
deep-clone-object.js
@@
-1,13
+1,13
@@
/* eslint-disable no-unused-vars */
const Benchmark = require('benny')
/* eslint-disable no-unused-vars */
const Benchmark = require('benny')
-const { generateRandomObject } = require('./benchmark-utils')
const _ = require('lodash')
const clone = require('just-clone')
const _ = require('lodash')
const clone = require('just-clone')
+const { generateRandomObject } = require('./benchmark-utils')
-const
{ object, size }
= generateRandomObject()
+const
object
= generateRandomObject()
Benchmark.suite(
Benchmark.suite(
- `Deep clone object with ${
size
} keys`,
+ `Deep clone object with ${
Object.keys(object).length
} keys`,
Benchmark.add('JSON stringify/parse', (obj = object) => {
const objClone = JSON.parse(JSON.stringify(obj))
}),
Benchmark.add('JSON stringify/parse', (obj = object) => {
const objClone = JSON.parse(JSON.stringify(obj))
}),