MCPcopy
hub / github.com/webpack/webpack / compareIds

Function compareIds

lib/util/comparators.js:82–89  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

80 * @returns {-1 | 0 | 1} compare result
81 */
82const compareIds = (a, b) => {
83 if (typeof a !== typeof b) {
84 return typeof a < typeof b ? -1 : 1;
85 }
86 if (a < b) return -1;
87 if (a > b) return 1;
88 return 0;
89};
90
91/**
92 * Compares iterables.

Calls

no outgoing calls

Tested by

no test coverage detected