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

Method constructor

benchmark/data-min.js:676–686  ·  view source on GitHub ↗
(t = {})

Source from the content-addressed store, hash-verified

674const v = Object.prototype.hasOwnProperty;
675class S {
676 constructor(t = {}) {
677 ((this.intro = t.intro || ''),
678 (this.separator =
679 t.separator !== void 0
680 ? t.separator
681 : `
682`),
683 (this.sources = []),
684 (this.uniqueSources = []),
685 (this.uniqueSourceIndexByFilename = {}));
686 }
687 addSource(t) {
688 if (t instanceof f)
689 return this.addSource({ content: t, filename: t.filename, separator: this.separator });

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected