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

Method _generateMappings

src/MagicString.ts:359–363  ·  view source on GitHub ↗

@internal

(mappings: Mappings)

Source from the content-addressed store, hash-verified

357
358 /** @internal */
359 _generateMappings(mappings: Mappings): string[] {
360 const names = [...this.storedNames]
361 mappings.addMagicString(this, 0, new Map(names.map((name, i) => [name, i])))
362 return names
363 }
364
365 /** @internal */
366 _mapProperties(options: SourceMapOptions, names: string[]): Omit<DecodedSourceMap, 'mappings' | 'rangeMappings'> {

Callers 2

generateDecodedMapMethod · 0.95
generateMapMethod · 0.95

Calls 1

addMagicStringMethod · 0.80

Tested by

no test coverage detected