(chunkGraph, a, b)
| 325 | * @returns {-1 | 0 | 1} compare result |
| 326 | */ |
| 327 | const compareModulesByIdOrIdentifier = (chunkGraph, a, b) => { |
| 328 | const cmp = compareIds( |
| 329 | /** @type {ModuleId} */ (chunkGraph.getModuleId(a)), |
| 330 | /** @type {ModuleId} */ (chunkGraph.getModuleId(b)) |
| 331 | ); |
| 332 | if (cmp !== 0) return cmp; |
| 333 | return compareIds(a.identifier(), b.identifier()); |
| 334 | }; |
| 335 | |
| 336 | /** |
| 337 | * Compare modules by their full name. This differs from comparing by identifier in that the values have been normalized to be relative to the compiler context. |
nothing calls this directly
no test coverage detected