MCPcopy Create free account
hub / github.com/error311/FileRise / compareSemver

Function compareSemver

public/js/adminPanel.js:58–69  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

56}
57
58function compareSemver(a, b) {
59 const pa = String(a || '').split('.').map(n => parseInt(n, 10) || 0);
60 const pb = String(b || '').split('.').map(n => parseInt(n, 10) || 0);
61 const len = Math.max(pa.length, pb.length);
62 for (let i = 0; i < len; i++) {
63 const na = pa[i] || 0;
64 const nb = pb[i] || 0;
65 if (na > nb) return 1;
66 if (na < nb) return -1;
67 }
68 return 0;
69}
70
71function startProBundleProgress({ action = 'Updating Pro', title, subText } = {}) {
72 return startTransferProgress({

Callers

nothing calls this directly

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected