()
| 45 | * The client will use this array to reconstruct the queue. |
| 46 | */ |
| 47 | export const getQueue = () => { |
| 48 | sortQueue(); |
| 49 | let probability = 0.4; |
| 50 | const result: (string | number)[] = []; |
| 51 | for (const b of queue) { |
| 52 | const nextProbability = Math.round((1 - b.$inverseProbability$) * 10); |
| 53 | if (nextProbability !== probability) { |
| 54 | probability = nextProbability; |
| 55 | result.push(probability); |
| 56 | } |
| 57 | result.push(b.$name$); |
| 58 | } |
| 59 | return result; |
| 60 | }; |
| 61 | |
| 62 | /** |
| 63 | * This is called when a bundle is queued, or finished loading. |
no test coverage detected
searching dependent graphs…