MCPcopy Create free account
hub / github.com/Effect-TS/effect / endsWithEscape

Function endsWithEscape

packages/effect/src/encoding/Yaml.ts:427–431  ·  view source on GitHub ↗
(text: string, end = text.length)

Source from the content-addressed store, hash-verified

425}
426
427const endsWithEscape = (text: string, end = text.length): boolean => {
428 let start = end
429 while (start > 0 && text[start - 1] === "\\") start--
430 return (end - start) % 2 === 1
431}
432
433// Escaped trailing spaces are content, not folding whitespace.
434const trimFoldedEnd = (line: string, quote: string): string => {

Callers 4

trimFoldedEndFunction · 0.85
foldQuotedLinesFunction · 0.85
readQuotedMethod · 0.85
parseQuotedValueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected