MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / firstText

Function firstText

deployments/desktop/static/desktop.js:4925–4938  ·  view source on GitHub ↗
(...values)

Source from the content-addressed store, hash-verified

4923 }
4924
4925 function firstText(...values) {
4926 for (const value of values) {
4927 if (Array.isArray(value)) {
4928 const joined = splitListValue(value).join("; ");
4929 if (joined) return joined;
4930 } else if (value && typeof value === "object") {
4931 const text = value.url || value.href || value.path || value.value || "";
4932 if (String(text).trim()) return String(text).trim();
4933 } else if (String(value || "").trim()) {
4934 return String(value).trim();
4935 }
4936 }
4937 return "";
4938 }
4939
4940 function pairLabel(item) {
4941 if (Array.isArray(item)) return String(item[0] || "").trim();

Callers 4

profileAffiliationFunction · 0.85
profileInfoItemFunction · 0.85
renderProfileInfoGridFunction · 0.85
renderProfileFormFunction · 0.85

Calls 1

splitListValueFunction · 0.85

Tested by

no test coverage detected