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

Method generateDecodedMap

src/MagicString.ts:338–349  ·  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

336 * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
337 */
338 generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap {
339 options = options || {}
340
341 const mappings = new Mappings(options.hires)
342 const names = this._generateMappings(mappings)
343
344 return {
345 ...this._mapProperties(options, names),
346 mappings: mappings.raw,
347 rangeMappings: mappings.rawRangeMappings,
348 }
349 }
350
351 /**
352 * Generates a version 3 sourcemap.

Callers

nothing calls this directly

Calls 2

_generateMappingsMethod · 0.95
_mapPropertiesMethod · 0.95

Tested by

no test coverage detected