mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-27 00:17:29 +00:00
refactor: dedupe shared record coercers
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user