refactor: dedupe extension string record helpers

This commit is contained in:
Peter Steinberger
2026-04-07 00:32:39 +01:00
parent a88f240311
commit f178a9dc41
4 changed files with 11 additions and 21 deletions

View File

@@ -1,8 +1,6 @@
export function asRecord(value: unknown): Record<string, unknown> | undefined {
return typeof value === "object" && value !== null
? (value as Record<string, unknown>)
: undefined;
}
import { asOptionalObjectRecord } from "openclaw/plugin-sdk/text-runtime";
export const asRecord = asOptionalObjectRecord;
export function readString(
record: Record<string, unknown> | undefined,