mirror of
https://fastgit.cc/github.com/openclaw/openclaw
synced 2026-04-24 02:43:26 +08:00
8 lines
199 B
TypeScript
8 lines
199 B
TypeScript
export function trimNonEmptyString(value: unknown): string | undefined {
|
|
if (typeof value !== "string") {
|
|
return undefined;
|
|
}
|
|
const trimmed = value.trim();
|
|
return trimmed || undefined;
|
|
}
|