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

Method toString

src/MagicString.ts:1174–1184  ·  view source on GitHub ↗

* Returns the generated string.

()

Source from the content-addressed store, hash-verified

1172 * Returns the generated string.
1173 */
1174 toString(): string {
1175 let str = this.intro
1176
1177 let chunk = this.firstChunk
1178 while (chunk) {
1179 str += chunk.toString()
1180 chunk = chunk.next
1181 }
1182
1183 return str + this.outro
1184 }
1185
1186 /**
1187 * 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