MCPcopy
hub / github.com/webpack/webpack / compareRuntime

Function compareRuntime

lib/util/runtime.js:181–194  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

179 * @returns {-1 | 0 | 1} compare
180 */
181const compareRuntime = (a, b) => {
182 if (a === b) {
183 return 0;
184 } else if (a === undefined) {
185 return -1;
186 } else if (b === undefined) {
187 return 1;
188 }
189 const aKey = getRuntimeKey(a);
190 const bKey = getRuntimeKey(b);
191 if (aKey < bKey) return -1;
192 if (aKey > bKey) return 1;
193 return 0;
194};
195
196/**
197 * Merges the provided values into a single result.

Callers

nothing calls this directly

Calls 1

getRuntimeKeyFunction · 0.85

Tested by

no test coverage detected