GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: refactor deepequal-object · nodejs/node@4d71442

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark/assert
    • deepequal-object.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/assert/deepequal-object.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-object.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ function main({ size, n, method }) {
2929
// TODO: Fix this "hack". `n` should not be manipulated.
3030
n = n / size;
3131

32+
if (!method)
33+
method = 'deepEqual';
34+
3235
const source = Array.apply(null, Array(size));
3336
const actual = createObj(source);
3437
const expected = createObj(source);
3538
const expectedWrong = createObj(source, '4');
3639

37-
// eslint-disable-next-line no-restricted-properties
38-
const fn = method !== '' ? assert[method] : assert.deepEqual;
40+
const fn = assert[method];
3941
const value2 = method.includes('not') ? expectedWrong : expected;
4042

4143
bench.start();

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.