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

Method toString

src/MagicString.ts:1198–1208  ·  view source on GitHub ↗

* Returns the generated string.

()

Source from the content-addressed store, hash-verified

1196 * Returns the generated string.
1197 */
1198 toString(): string {
1199 let str = this.intro
1200
1201 let chunk: Chunk | null = this.firstChunk
1202 while (chunk) {
1203 str += chunk.toString()
1204 chunk = chunk.next
1205 }
1206
1207 return str + this.outro
1208 }
1209
1210 /**
1211 * Returns true if the resulting source is empty (disregarding white space).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected