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,10 +1,6 @@
import { isRecord } from "openclaw/plugin-sdk/text-runtime";
import { asNullableRecord, isRecord } from "openclaw/plugin-sdk/text-runtime";
export { isRecord };
export function asRecord(value: unknown): Record<string, unknown> | null {
return isRecord(value) ? value : null;
}
export { asNullableRecord as asRecord, isRecord };
export function hasNonEmptyString(value: unknown): value is string {
return typeof value === "string" && value.trim().length > 0;