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

Method toString

src/MagicString.ts:1017–1027  ·  view source on GitHub ↗

* Returns the generated string.

()

Source from the content-addressed store, hash-verified

1015 * Returns the generated string.
1016 */
1017 toString(): string {
1018 let str = this.intro
1019
1020 let chunk = this.firstChunk
1021 while (chunk) {
1022 str += chunk.toString()
1023 chunk = chunk.next
1024 }
1025
1026 return str + this.outro
1027 }
1028
1029 /**
1030 * Returns true if the resulting source is empty (disregarding white space).

Callers 1

hasChangedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected