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

Method constructor

benchmark/data-min.js:229–248  ·  view source on GitHub ↗
(t, e = {})

Source from the content-addressed store, hash-verified

227 c = { insertLeft: !1, insertRight: !1, storeName: !1 };
228class f {
229 constructor(t, e = {}) {
230 const n = new g(0, t.length, t);
231 (Object.defineProperties(this, {
232 original: { writable: !0, value: t },
233 outro: { writable: !0, value: '' },
234 intro: { writable: !0, value: '' },
235 firstChunk: { writable: !0, value: n },
236 lastChunk: { writable: !0, value: n },
237 lastSearchedChunk: { writable: !0, value: n },
238 byStart: { writable: !0, value: {} },
239 byEnd: { writable: !0, value: {} },
240 filename: { writable: !0, value: e.filename },
241 indentExclusionRanges: { writable: !0, value: e.indentExclusionRanges },
242 sourcemapLocations: { writable: !0, value: new p() },
243 storedNames: { writable: !0, value: {} },
244 indentStr: { writable: !0, value: L(t) },
245 }),
246 (this.byStart[0] = n),
247 (this.byEnd[t.length] = n));
248 }
249 addSourcemapLocation(t) {
250 this.sourcemapLocations.add(t);
251 }

Callers

nothing calls this directly

Calls 1

LFunction · 0.85

Tested by

no test coverage detected