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

Method _mapProperties

src/MagicString.ts:410–420  ·  view source on GitHub ↗

@internal

(options: SourceMapOptions, names: string[])

Source from the content-addressed store, hash-verified

408
409 /** @internal */
410 _mapProperties(options: SourceMapOptions, names: string[]): Omit<DecodedSourceMap, 'mappings' | 'rangeMappings'> {
411 return {
412 file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
413 sources: [
414 options.source ? getRelativePath(options.file || '', options.source) : options.file || '',
415 ],
416 sourcesContent: options.includeContent ? [this.original] : undefined,
417 names,
418 x_google_ignoreList: this.ignoreList ? [0] : undefined,
419 }
420 }
421
422 /** @internal */
423 _ensureindentStr(): void {

Callers 2

generateDecodedMapMethod · 0.95
generateMapMethod · 0.95

Calls 2

getRelativePathFunction · 0.90
splitMethod · 0.45

Tested by

no test coverage detected