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

Function toSafeString

scripts/hsr/widget-code-editor-state.mjs:1–3  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1function toSafeString(value) {
2 return typeof value === "string" ? value : "";
3}
4
5export function splitCodeDraft(draft) {
6 const normalized = toSafeString(draft).replace(/\r\n?/g, "\n");

Callers 2

splitCodeDraftFunction · 0.85
joinCodeLinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected