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

Method toString

src/Bundle.ts:428–438  ·  view source on GitHub ↗

* Returns the intro followed by every source's generated string, joined by their separators.

()

Source from the content-addressed store, hash-verified

426 * Returns the intro followed by every source's generated string, joined by their separators.
427 */
428 toString(): string {
429 const body = this.sources
430 .map((source, i) => {
431 const str = (i > 0 ? source.separator : '') + source.content.toString()
432
433 return str
434 })
435 .join('')
436
437 return this.intro + body
438 }
439
440 /**
441 * Returns true if the bundle's output is empty (disregarding white space).

Callers 1

toMagicStringMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected