File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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.
99function 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.
1515function 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.
2929function 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}
You can’t perform that action at this time.
0 commit comments