mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 20:34:32 +00:00
style: oxfmt core files
This commit is contained in:
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user