MCPcopy
hub / github.com/affaan-m/ECC / compareVersionDesc

Function compareVersionDesc

scripts/harness-audit.js:254–268  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

252}
253
254function compareVersionDesc(a, b) {
255 const partsA = String(a).split('.').map(part => parseInt(part, 10) || 0);
256 const partsB = String(b).split('.').map(part => parseInt(part, 10) || 0);
257 const length = Math.max(partsA.length, partsB.length);
258
259 for (let index = 0; index < length; index += 1) {
260 const valueA = partsA[index] || 0;
261 const valueB = partsB[index] || 0;
262 if (valueA !== valueB) {
263 return valueB - valueA;
264 }
265 }
266
267 return 0;
268}
269
270function findPluginJsonUnder(installRoot) {
271 const pluginJson = path.join(installRoot, '.claude-plugin', 'plugin.json');

Callers 1

runTestsFunction · 0.85

Calls

no outgoing calls

Tested by 1

runTestsFunction · 0.68