* Sorting predicate which allows current ChunkGroup to be compared against another. * Sorting values are based off of number of chunks in ChunkGroup. * @param {ChunkGraph} chunkGraph the chunk graph * @param {ChunkGroup} otherGroup the chunkGroup to compare this against * @returns {-1 | 0 |
(chunkGraph, otherGroup)
| 536 | * @returns {-1 | 0 | 1} sort position for comparison |
| 537 | */ |
| 538 | compareTo(chunkGraph, otherGroup) { |
| 539 | if (this.chunks.length > otherGroup.chunks.length) return -1; |
| 540 | if (this.chunks.length < otherGroup.chunks.length) return 1; |
| 541 | return compareIterables(compareChunks(chunkGraph))( |
| 542 | this.chunks, |
| 543 | otherGroup.chunks |
| 544 | ); |
| 545 | } |
| 546 | |
| 547 | /** |
| 548 | * Aggregates per-block `*Order` options for the blocks that bridge this |
no test coverage detected