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

Method toString

src/MagicString.ts:1030–1040  ·  view source on GitHub ↗

* Returns the generated string.

()

Source from the content-addressed store, hash-verified

1028 * Returns the generated string.
1029 */
1030 toString(): string {
1031 let str = this.intro
1032
1033 let chunk = this.firstChunk
1034 while (chunk) {
1035 str += chunk.toString()
1036 chunk = chunk.next
1037 }
1038
1039 return str + this.outro
1040 }
1041
1042 /**
1043 * 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