MCPcopy Create free account
hub / github.com/ArrowM/Queue-Bot / formatPropertyValue

Function formatPropertyValue

src/utils/string.utils.ts:142–153  ·  view source on GitHub ↗
(entry: T, property: string)

Source from the content-addressed store, hash-verified

140 }
141
142 function formatPropertyValue(entry: T, property: string): string {
143 // handle mentionable properties
144 if ("isRole" in entry) {
145 const isRole = (entry as any).isRole;
146 const subjectId = (entry as any).subjectId;
147 return isRole ? roleMention(subjectId) : userMention(subjectId);
148 }
149
150 const value = (entry as any)[property];
151 const valueFormatter = propertyFormatters[property];
152 return valueFormatter ? valueFormatter(value) : inlineCode(String(value));
153 }
154
155 function formatDescriptionProperty(entry: T, property: string): string {
156 const value = (entry as any)[property];

Callers 2

formatEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected