@xynogen/pix-data 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/data.ts +4 -2
package/package.json
CHANGED
package/src/data.ts
CHANGED
|
@@ -551,7 +551,7 @@ function lookupBenchlmScore(
|
|
|
551
551
|
|
|
552
552
|
// Best entry = highest overallScore. Sort by score desc, then by slug
|
|
553
553
|
// length asc (prefer base name over suffix variants on a tie).
|
|
554
|
-
const
|
|
554
|
+
const sorted = [...candidates].sort((a, b) => {
|
|
555
555
|
const sa = a.overallScore ?? -Infinity;
|
|
556
556
|
const sb = b.overallScore ?? -Infinity;
|
|
557
557
|
if (sa !== sb) return sb - sa;
|
|
@@ -559,7 +559,9 @@ function lookupBenchlmScore(
|
|
|
559
559
|
normalizeBenchlmName(a.model).length -
|
|
560
560
|
normalizeBenchlmName(b.model).length
|
|
561
561
|
);
|
|
562
|
-
})
|
|
562
|
+
});
|
|
563
|
+
const best = sorted[0];
|
|
564
|
+
if (!best) return null;
|
|
563
565
|
return best.overallScore ?? null;
|
|
564
566
|
}
|
|
565
567
|
|