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

Method generateDecodedMap

src/MagicString.ts:328–339  ·  view source on GitHub ↗

* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.

(options?: SourceMapOptions)

Source from the content-addressed store, hash-verified

326 * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
327 */
328 generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap {
329 options = options || {}
330
331 const mappings = new Mappings(options.hires)
332 const names = this._generateMappings(mappings)
333
334 return {
335 ...this._mapProperties(options, names),
336 mappings: mappings.raw,
337 rangeMappings: mappings.rawRangeMappings,
338 }
339 }
340
341 /**
342 * Generates a version 3 sourcemap.

Callers

nothing calls this directly

Calls 2

_generateMappingsMethod · 0.95
_mapPropertiesMethod · 0.95

Tested by

no test coverage detected