MCPcopy Create free account
hub / github.com/codeHappyDananx/SpecWave / detectEol

Function detectEol

electron/main.js:664–667  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

662}
663
664function detectEol(text) {
665 if (typeof text !== 'string' || text.length === 0) return '\n'
666 return text.indexOf('\r\n') >= 0 ? '\r\n' : '\n'
667}
668
669function normalizeEol(text, eol) {
670 const normalized = String(text || '').replace(/\r\n/g, '\n').replace(/\r/g, '\n')

Callers 1

main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected