MCPcopy Create free account
hub / github.com/CommE2E/comm / firstLine

Function firstLine

lib/utils/string-utils.js:4–9  ·  view source on GitHub ↗
(text: ?string)

Source from the content-addressed store, hash-verified

2
3const newlineRegex: RegExp = /[\r\n]/;
4function firstLine(text: ?string): string {
5 if (!text) {
6 return '';
7 }
8 return text.split(newlineRegex, 1)[0];
9}
10
11export { newlineRegex, firstLine };

Callers 7

createThreadFunction · 0.90
updateThreadFunction · 0.90
threadUINameFunction · 0.90
SingleLineFunction · 0.90
SingleLineFunction · 0.90
renderContentMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected