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

Method length

src/MagicString.ts:1005–1013  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1003 }
1004
1005 length(): number {
1006 let chunk: Chunk | null = this.firstChunk
1007 let length = 0
1008 while (chunk) {
1009 length += chunk.intro.length + chunk.content.length + chunk.outro.length
1010 chunk = chunk.next
1011 }
1012 return length
1013 }
1014
1015 /**
1016 * Removes empty lines from the start and end.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected