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

Method generateDecodedMap

benchmark/data-min.js:287–311  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

285 );
286 }
287 generateDecodedMap(t) {
288 t = t || {};
289 const e = 0,
290 n = Object.keys(this.storedNames),
291 i = new y(t.hires),
292 r = C(this.original);
293 return (
294 this.intro && i.advance(this.intro),
295 this.firstChunk.eachNext((s) => {
296 const h = r(s.start);
297 (s.intro.length && i.advance(s.intro),
298 s.edited
299 ? i.addEdit(e, s.content, h, s.storeName ? n.indexOf(s.original) : -1)
300 : i.addUneditedChunk(e, s, this.original, h, this.sourcemapLocations),
301 s.outro.length && i.advance(s.outro));
302 }),
303 {
304 file: t.file ? t.file.split(/[/\\]/).pop() : null,
305 sources: [t.source ? E(t.file || '', t.source) : null],
306 sourcesContent: t.includeContent ? [this.original] : [null],
307 names: n,
308 mappings: i.raw,
309 }
310 );
311 }
312 generateMap(t) {
313 return new b(this.generateDecodedMap(t));
314 }

Callers 2

generateMapMethod · 0.95
benchFunction · 0.45

Calls 7

advanceMethod · 0.95
addEditMethod · 0.95
addUneditedChunkMethod · 0.95
CFunction · 0.85
EFunction · 0.85
eachNextMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected