lib/player.js
function cacheTracksArray(self) {
  self.tracksInOrder = Object.keys(self.playlist).map(trackById);
  self.tracksInOrder.sort(asc);
  self.tracksInOrder.forEach(function(track, index) {
    track.index = index;
  });

  function asc(a, b) {
    return operatorCompare(a.sortKey, b.sortKey);
  }
  function trackById(id) {
    return self.playlist[id];
  }
}
function cacheTracksArray(self) {
  self.tracksInOrder = Object.keys(self.playlist).map(trackById);
  self.tracksInOrder.sort(asc);
  self.tracksInOrder.forEach(function(track, index) {
    track.index = index;
  });

  function asc(a, b) {
    return operatorCompare(a.sortKey, b.sortKey);
  }
  function trackById(id) {
    return self.playlist[id];
  }
}
function cacheTracksArray ( self ) { self . tracksInOrder = Object . keys ( self . playlist ) . map ( trackById ) ; self . tracksInOrder . sort ( asc ) ; self . tracksInOrder . forEach ( function ( track , index ) { track . index = index ; } ) ; function asc ( a , b ) { return operatorCompare ( a . sortKey , b . sortKey ) ; } function trackById ( id ) { return self . playlist [ id ] ; } }
generate self.tracksInOrder from self.playlist
generate self . tracksInOrder from self . playlist