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

Method toString

benchmark/data.js:1001–1010  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

999 return this;
1000 }
1001 toString() {
1002 const body = this.sources
1003 .map((source, i) => {
1004 const separator = source.separator !== void 0 ? source.separator : this.separator;
1005 const str = (i > 0 ? separator : '') + source.content.toString();
1006 return str;
1007 })
1008 .join('');
1009 return this.intro + body;
1010 }
1011 isEmpty() {
1012 if (this.intro.length && this.intro.trim()) return false;
1013 if (this.sources.some((source) => !source.content.isEmpty())) return false;

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected