MCPcopy Create free account
hub / github.com/FIND-Lab/AgentWard / getString

Function getString

layers/foundation-scan.ts:673–679  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

671}
672
673function getString(value: unknown): string | null {
674 if (typeof value !== "string") {
675 return null;
676 }
677 const trimmed = value.trim();
678 return trimmed.length > 0 ? trimmed : null;
679}
680
681function getStringArray(value: unknown): string[] | null {
682 if (!Array.isArray(value)) {

Calls

no outgoing calls

Tested by

no test coverage detected