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

Method clone

benchmark/data-min.js:714–722  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

712 return (this.addSource({ content: new f(t), separator: (e && e.separator) || '' }), this);
713 }
714 clone() {
715 const t = new S({ intro: this.intro, separator: this.separator });
716 return (
717 this.sources.forEach((e) => {
718 t.addSource({ filename: e.filename, content: e.content.clone(), separator: e.separator });
719 }),
720 t
721 );
722 }
723 generateDecodedMap(t = {}) {
724 const e = [];
725 this.sources.forEach((i) => {

Callers

nothing calls this directly

Calls 2

addSourceMethod · 0.95
cloneMethod · 0.45

Tested by

no test coverage detected