Skip to content

Commit 19a0e06

Browse files
alexbostockaddaleax
authored andcommitted
linkedlist: correct grammar in comments
PR-URL: #14546 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
1 parent fa8c5f4 commit 19a0e06

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/internal/linkedlist.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ function init(list) {
55
list._idlePrev = list;
66
}
77

8-
// show the most idle item
8+
// Show the most idle item.
99
function peek(list) {
1010
if (list._idlePrev === list) return null;
1111
return list._idlePrev;
1212
}
1313

14-
// remove a item from its list
14+
// Remove an item from its list.
1515
function remove(item) {
1616
if (item._idleNext) {
1717
item._idleNext._idlePrev = item._idlePrev;
@@ -25,18 +25,18 @@ function remove(item) {
2525
item._idlePrev = null;
2626
}
2727

28-
// remove a item from its list and place at the end.
28+
// Remove an item from its list and place at the end.
2929
function append(list, item) {
3030
if (item._idleNext || item._idlePrev) {
3131
remove(item);
3232
}
3333

34-
// items are linked with _idleNext -> (older) and _idlePrev -> (newer)
34+
// Items are linked with _idleNext -> (older) and _idlePrev -> (newer).
3535
// Note: This linkage (next being older) may seem counter-intuitive at first.
3636
item._idleNext = list._idleNext;
3737
item._idlePrev = list;
3838

39-
// the list _idleNext points to tail (newest) and _idlePrev to head (oldest)
39+
// The list _idleNext points to tail (newest) and _idlePrev to head (oldest).
4040
list._idleNext._idlePrev = item;
4141
list._idleNext = item;
4242
}

0 commit comments

Comments
 (0)