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

Method _mapProperties

src/MagicString.ts:366–376  ·  view source on GitHub ↗

@internal

(options: SourceMapOptions, names: string[])

Source from the content-addressed store, hash-verified

364
365 /** @internal */
366 _mapProperties(options: SourceMapOptions, names: string[]): Omit<DecodedSourceMap, 'mappings' | 'rangeMappings'> {
367 return {
368 file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
369 sources: [
370 options.source ? getRelativePath(options.file || '', options.source) : options.file || '',
371 ],
372 sourcesContent: options.includeContent ? [this.original] : undefined,
373 names,
374 x_google_ignoreList: this.ignoreList ? [0] : undefined,
375 }
376 }
377
378 /** @internal */
379 _ensureindentStr(): void {

Callers 2

generateDecodedMapMethod · 0.95
generateMapMethod · 0.95

Calls 2

getRelativePathFunction · 0.90
splitMethod · 0.45

Tested by

no test coverage detected