MCPcopy
hub / github.com/garrytan/gstack / compareSpecificity

Function compareSpecificity

browse/src/cdp-inspector.ts:215–222  ·  view source on GitHub ↗

* Compare specificities: returns negative if s1 < s2, positive if s1 > s2, 0 if equal.

(
  s1: { a: number; b: number; c: number },
  s2: { a: number; b: number; c: number }
)

Source from the content-addressed store, hash-verified

213 * Compare specificities: returns negative if s1 < s2, positive if s1 > s2, 0 if equal.
214 */
215function compareSpecificity(
216 s1: { a: number; b: number; c: number },
217 s2: { a: number; b: number; c: number }
218): number {
219 if (s1.a !== s2.a) return s1.a - s2.a;
220 if (s1.b !== s2.b) return s1.b - s2.b;
221 return s1.c - s2.c;
222}
223
224// ─── Core Functions ─────────────────────────────────────────────
225

Callers 1

inspectElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected