mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 10:50:22 +00:00
refactor: dedupe shared record coercers
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user