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

Method isEmpty

benchmark/data.js:1011–1015  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;
1014 return true;
1015 }
1016 length() {
1017 return this.sources.reduce(
1018 (length, source) => length + source.content.length(),

Callers

nothing calls this directly

Calls 1

trimMethod · 0.45

Tested by

no test coverage detected