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

Function normalizeLines

packages/effect/src/encoding/Xml.ts:1091–1091  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

1089const encodingPattern = /^[A-Za-z][A-Za-z0-9._-]*$/
1090
1091const normalizeLines = (s: string): string => s.indexOf("\r") === -1 ? s : s.replace(lineEndings, "\n")
1092
1093// Normalizes the line endings and whitespace of a literal attribute value part
1094const normalizeAttribute = (s: string): string => s.replace(attributeWhitespace, " ")

Callers 6

parseMethod · 0.85
decodeTextMethod · 0.85
commentMethod · 0.85
processingInstructionMethod · 0.85
cdataMethod · 0.85
doctypeDeclarationMethod · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected