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 — http, readline: replace sort with toSorted · nodejs/node@b13aea5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/readline
    • utils.js
  • typings
    • primordials.d.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/readline/utils.js‎

Copy file name to clipboardExpand all lines: lib/internal/readline/utils.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
'use strict';
22

33
const {
4-
ArrayPrototypeSlice,
5-
ArrayPrototypeSort,
4+
ArrayPrototypeToSorted,
65
RegExpPrototypeExec,
76
StringFromCharCode,
87
StringPrototypeCharCodeAt,
@@ -385,7 +384,7 @@ function commonPrefix(strings) {
385384
if (strings.length === 1) {
386385
return strings[0];
387386
}
388-
const sorted = ArrayPrototypeSort(ArrayPrototypeSlice(strings));
387+
const sorted = ArrayPrototypeToSorted(strings);
389388
const min = sorted[0];
390389
const max = sorted[sorted.length - 1];
391390
for (let i = 0; i < min.length; i++) {
Collapse file

‎typings/primordials.d.ts‎

Copy file name to clipboardExpand all lines: typings/primordials.d.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ declare namespace primordials {
128128
export const ArrayPrototypeSlice: UncurryThis<typeof Array.prototype.slice>
129129
export const ArrayPrototypeSort: UncurryThis<typeof Array.prototype.sort>
130130
export const ArrayPrototypeSplice: UncurryThis<typeof Array.prototype.splice>
131+
export const ArrayPrototypeToSorted: UncurryThis<typeof Array.prototype.toSorted>
131132
export const ArrayPrototypeIncludes: UncurryThis<typeof Array.prototype.includes>
132133
export const ArrayPrototypeIndexOf: UncurryThis<typeof Array.prototype.indexOf>
133134
export const ArrayPrototypeJoin: UncurryThis<typeof Array.prototype.join>

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.