mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 23:20:24 +00:00
refactor: dedupe shared string predicates
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { asNullableRecord, isRecord } from "openclaw/plugin-sdk/text-runtime";
|
||||
import {
|
||||
asNullableRecord,
|
||||
hasNonEmptyString as sharedHasNonEmptyString,
|
||||
isRecord,
|
||||
} from "openclaw/plugin-sdk/text-runtime";
|
||||
|
||||
export { asNullableRecord as asRecord, isRecord };
|
||||
|
||||
export function hasNonEmptyString(value: unknown): value is string {
|
||||
return typeof value === "string" && value.trim().length > 0;
|
||||
}
|
||||
export const hasNonEmptyString = sharedHasNonEmptyString;
|
||||
|
||||
export function normalizeString(value: unknown): string | undefined {
|
||||
if (typeof value === "string") {
|
||||
|
||||
Reference in New Issue
Block a user