File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ function init(list) {
5
5
list . _idlePrev = list ;
6
6
}
7
7
8
- // show the most idle item
8
+ // Show the most idle item.
9
9
function peek ( list ) {
10
10
if ( list . _idlePrev === list ) return null ;
11
11
return list . _idlePrev ;
12
12
}
13
13
14
- // remove a item from its list
14
+ // Remove an item from its list.
15
15
function remove ( item ) {
16
16
if ( item . _idleNext ) {
17
17
item . _idleNext . _idlePrev = item . _idlePrev ;
@@ -25,18 +25,18 @@ function remove(item) {
25
25
item . _idlePrev = null ;
26
26
}
27
27
28
- // remove a item from its list and place at the end.
28
+ // Remove an item from its list and place at the end.
29
29
function append ( list , item ) {
30
30
if ( item . _idleNext || item . _idlePrev ) {
31
31
remove ( item ) ;
32
32
}
33
33
34
- // items are linked with _idleNext -> (older) and _idlePrev -> (newer)
34
+ // Items are linked with _idleNext -> (older) and _idlePrev -> (newer).
35
35
// Note: This linkage (next being older) may seem counter-intuitive at first.
36
36
item . _idleNext = list . _idleNext ;
37
37
item . _idlePrev = list ;
38
38
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).
40
40
list . _idleNext . _idlePrev = item ;
41
41
list . _idleNext = item ;
42
42
}
You can’t perform that action at this time.
0 commit comments