(stats: AdminStat[])
| 650 | } |
| 651 | |
| 652 | function pickStableText(seed: string, options: string[]): string { |
| 653 | let hash = 0; |
| 654 | for (let index = 0; index < seed.length; index++) { |
| 655 | hash = (hash * 33 + seed.charCodeAt(index)) >>> 0; |
| 656 | } |
| 657 | return options[hash % options.length]; |
| 658 | } |
| 659 | |
| 660 | function buildSortComment( |
| 661 | stat: AdminStat, |
| 662 | index: number, |
| 663 | total: number, |
| 664 | ): string { |
| 665 | const avg = stat.sortAvgPerDay; |