MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / joinCodeLines

Function joinCodeLines

scripts/hsr/widget-code-editor-state.mjs:11–15  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

9}
10
11export function joinCodeLines(lines) {
12 if (!Array.isArray(lines) || lines.length === 0) return "";
13 const safeLines = lines.map((line) => toSafeString(line).replace(/\r/g, ""));
14 return safeLines.join("\n");
15}
16
17export function clampCodeCursor(lines, cursor) {
18 const safeLines = splitCodeDraft(joinCodeLines(lines));

Callers 6

codeDraftFromStateFunction · 0.90
buildViewFunction · 0.90
normalizeCodeLinesFunction · 0.90
clampCodeCursorFunction · 0.85
findBannerCursorFunction · 0.85

Calls 2

toSafeStringFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected