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

Method isEmpty

src/MagicString.js:716–727  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

714 }
715
716 isEmpty() {
717 let chunk = this.firstChunk;
718 do {
719 if (
720 (chunk.intro.length && chunk.intro.trim()) ||
721 (chunk.content.length && chunk.content.trim()) ||
722 (chunk.outro.length && chunk.outro.trim())
723 )
724 return false;
725 } while ((chunk = chunk.next));
726 return true;
727 }
728
729 length() {
730 let chunk = this.firstChunk;

Callers

nothing calls this directly

Calls 1

trimMethod · 0.45

Tested by

no test coverage detected