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

Method length

src/MagicString.ts:1047–1055  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected