MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / endLine

Method endLine

src/utils/MappingsEncoder.ts:67–73  ·  view source on GitHub ↗
(segments: FullSegment[])

Source from the content-addressed store, hash-verified

65 }
66
67 endLine(segments: FullSegment[]): void {
68 this.lines.push(segments)
69 // count the line itself too, so content dominated by line breaks also drains
70 this.buffered += segments.length + 1
71 if (this.buffered >= SEGMENTS_PER_FLUSH)
72 this.drain(null)
73 }
74
75 segments(segments: FullSegment[]): void {
76 this.drain(segments)

Callers 2

nextLineMethod · 0.80

Calls 1

drainMethod · 0.95

Tested by

no test coverage detected