refactor: dedupe shared record coercers

This commit is contained in:
Peter Steinberger
2026-04-07 00:30:42 +01:00
parent 560a7aecd0
commit a88f240311
8 changed files with 17 additions and 30 deletions

View File

@@ -1,9 +1,4 @@
export function asRecord(value: unknown): Record<string, unknown> | null {
if (!value || typeof value !== "object" || Array.isArray(value)) {
return null;
}
return value as Record<string, unknown>;
}
export { asNullableRecord as asRecord } from "openclaw/plugin-sdk/text-runtime";
export function normalizeTrimmedString(value: unknown): string | undefined {
if (typeof value !== "string") {