style: oxfmt core files

This commit is contained in:
Peter Steinberger
2026-01-19 05:59:29 +00:00
parent d126e7f610
commit 2dc9c95530
9 changed files with 275 additions and 274 deletions

View File

@@ -15,7 +15,9 @@ function isPrimitive(value: unknown): value is string | number | boolean | bigin
function normalizeForHash(value: unknown): unknown {
if (value === undefined) return undefined;
if (Array.isArray(value)) {
const normalized = value.map(normalizeForHash).filter((item): item is unknown => item !== undefined);
const normalized = value
.map(normalizeForHash)
.filter((item): item is unknown => item !== undefined);
const primitives = normalized.filter(isPrimitive);
if (primitives.length === normalized.length) {
return [...primitives].sort((a, b) => String(a).localeCompare(String(b)));