MCPcopy Index your code
hub / github.com/kpdecker/jsdiff / hasOnlyUnixLineEndings

Function hasOnlyUnixLineEndings

src/util/string.ts:101–103  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

99 * Returns true if the string consistently uses Unix line endings.
100 */
101export function hasOnlyUnixLineEndings(string: string): boolean {
102 return !string.includes('\r\n') && string.includes('\n');
103}
104
105/**
106 * Split a string into segments using a word segmenter, merging consecutive

Callers 1

applyStructuredPatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected