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

Method length

src/MagicString.ts:1052–1060  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1050 }
1051
1052 length(): number {
1053 let chunk: Chunk | null = this.firstChunk
1054 let length = 0
1055 while (chunk) {
1056 length += chunk.intro.length + chunk.content.length + chunk.outro.length
1057 chunk = chunk.next
1058 }
1059 return length
1060 }
1061
1062 /**
1063 * Removes empty lines from the start and end.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected