Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
return Reflect.ownKeys(obj).length === 0 && obj.constructor === Object
}),
Benchmark.add('Keys iteration ', (obj = testObject) => {
- if (obj.constructor !== Object) return false
+ if (obj?.constructor !== Object) return false
// Iterates over the keys of an object, if
// any exist, return false.
// eslint-disable-next-line no-unreachable-loop
"name": "benchmarks-js",
"version": "0.0.1",
"description": "JS code pattern benchmarks",
+ "engines": {
+ "node": ">=14.x"
+ },
"repository": {
"type": "git",
"url": "git://github.com/jerome-benoit/benchmarks-js.git"