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

Method toString

src/MagicString.ts:1022–1032  ·  view source on GitHub ↗

* Returns the generated string.

()

Source from the content-addressed store, hash-verified

1020 * Returns the generated string.
1021 */
1022 toString(): string {
1023 let str = this.intro
1024
1025 let chunk = this.firstChunk
1026 while (chunk) {
1027 str += chunk.toString()
1028 chunk = chunk.next
1029 }
1030
1031 return str + this.outro
1032 }
1033
1034 /**
1035 * 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