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 — util: use more primordials in `comparisons.js` · nodejs/node@64c20b4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/util
    • comparisons.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/util/comparisons.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/comparisons.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ function setEquiv(a, b, mode, memo) {
761761
// If the specified value doesn't exist in the second set it's a object
762762
// (or in loose mode: a non-matching primitive). Find the
763763
// deep-(mode-)equal element in a set copy to reduce duplicate checks.
764-
array.push(val);
764+
ArrayPrototypePush(array, val);
765765
}
766766
}
767767

@@ -891,7 +891,7 @@ function mapEquiv(a, b, mode, memo) {
891891
}
892892
array = [];
893893
}
894-
array.push(key2);
894+
ArrayPrototypePush(array, key2);
895895
} else {
896896
// By directly retrieving the value we prevent another b.has(key2) check in
897897
// almost all possible cases.
@@ -907,7 +907,7 @@ function mapEquiv(a, b, mode, memo) {
907907
if (array === undefined) {
908908
array = [];
909909
}
910-
array.push(key2);
910+
ArrayPrototypePush(array, key2);
911911
}
912912
}
913913
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.