File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function create() {
1414}
1515exports . create = create ;
1616
17- // show the most idle item
17+ // Show the most idle item.
1818function peek ( list ) {
1919if ( list . _idlePrev === list ) return null ;
2020return list . _idlePrev ;
@@ -31,7 +31,7 @@ function shift(list) {
3131exports . shift = shift ;
3232
3333
34- // remove a item from its list
34+ // Remove an item from its list.
3535function remove ( item ) {
3636if ( item . _idleNext ) {
3737item . _idleNext . _idlePrev = item . _idlePrev ;
@@ -47,18 +47,18 @@ function remove(item) {
4747exports . remove = remove ;
4848
4949
50- // remove a item from its list and place at the end.
50+ // Remove an item from its list and place at the end.
5151function append ( list , item ) {
5252if ( item . _idleNext || item . _idlePrev ) {
5353remove ( item ) ;
5454}
5555
56- // items are linked with _idleNext -> (older) and _idlePrev -> (newer)
56+ // Items are linked with _idleNext -> (older) and _idlePrev -> (newer).
5757// Note: This linkage (next being older) may seem counter-intuitive at first.
5858item . _idleNext = list . _idleNext ;
5959item . _idlePrev = list ;
6060
61- // the list _idleNext points to tail (newest) and _idlePrev to head (oldest)
61+ // The list _idleNext points to tail (newest) and _idlePrev to head (oldest).
6262list . _idleNext . _idlePrev = item ;
6363list . _idleNext = item ;
6464}
You can’t perform that action at this time.
0 commit comments