MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / readString

Function readString

src/core/createCompat.ts:304–312  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

302}
303
304function readString(value: unknown): string | undefined {
305 if (typeof value === "string" && value.trim().length > 0) {
306 return value.trim();
307 }
308 if (typeof value === "number" || typeof value === "boolean") {
309 return String(value);
310 }
311 return undefined;
312}
313
314function readStringList(value: unknown): string[] {
315 if (Array.isArray(value)) {

Callers 2

buildTemplateValuesFunction · 0.85
readStringListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected