MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getCommentTexts

Function getCommentTexts

site/thumbnail.ts:56–67  ·  view source on GitHub ↗
(
  comment: {summary?: {text: string}[]} | undefined,
)

Source from the content-addressed store, hash-verified

54): string | undefined => parts?.map(({text}) => text).join('');
55
56const getCommentTexts = (
57 comment: {summary?: {text: string}[]} | undefined,
58): [string, string | undefined] | [undefined, undefined] => {
59 const text = getCommentText(comment?.summary);
60 if (!text) {
61 return [undefined, undefined];
62 }
63 const lineBreak = text.indexOf('\n\n');
64 return lineBreak > -1
65 ? [text.slice(0, lineBreak), text.slice(lineBreak)]
66 : [text, undefined];
67};
68
69const getReflectionMarkdown = (reflection: any): string[] =>
70 [

Callers 1

getReflectionMarkdownFunction · 0.85

Calls 1

getCommentTextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…