function annotatedMappings(map) {
  const smc = new SourceMapConsumer(map)
  const annotations = {}

  smc.eachMapping((mapping) => {
    let annotation = (annotations[mapping.generatedLine] = annotations[mapping.generatedLine] || {
      ...mapping,

      original: {
        start: [mapping.originalLine, mapping.originalColumn],
        end: [mapping.originalLine, mapping.originalColumn],
      },

      generated: {
        start: [mapping.generatedLine, mapping.generatedColumn],
        end: [mapping.generatedLine, mapping.generatedColumn],
      },
    })

    annotation.generated.end[0] = mapping.generatedLine
    annotation.generated.end[1] = mapping.generatedColumn

    annotation.original.end[0] = mapping.originalLine
    annotation.original.end[1] = mapping.originalColumn
  })

  return Object.values(annotations).map((annotation) => {
    return `${formatRange(annotation.original)} -> ${formatRange(annotation.generated)}`
  })
}
/**
 * An string annotation that represents a source map
 *
 * It's not meant to be exhaustive just enough to
 * verify that the source map is working and that
 * lines are mapped back to the original source
 *
 * Including when using @apply with multiple classes
 *
 * @param {import('source-map-js').RawSourceMap} map
 */
An string annotation that represents a source map
It's not meant to be exhaustive just enough to
verify that the source map is working and that
lines are mapped back to the original source

Including when using @apply with multiple classes


An string annotation that represents a source map It ' s not meant to be exhaustive just enough to verify that the source map is working and that lines are mapped back to the original source Including when using @apply with multiple classes
function annotatedMappings(map) {
  const smc = new SourceMapConsumer(map)
  const annotations = {}
  smc.eachMapping((mapping) => {
    let annotation = (annotations[mapping.generatedLine] = annotations[mapping.generatedLine] || {
      ...mapping,
      original: {
        start: [mapping.originalLine, mapping.originalColumn],
        end: [mapping.originalLine, mapping.originalColumn],
      },
      generated: {
        start: [mapping.generatedLine, mapping.generatedColumn],
        end: [mapping.generatedLine, mapping.generatedColumn],
      },
    })
    annotation.generated.end[0] = mapping.generatedLine
    annotation.generated.end[1] = mapping.generatedColumn
    annotation.original.end[0] = mapping.originalLine
    annotation.original.end[1] = mapping.originalColumn
  })
  return Object.values(annotations).map((annotation) => {
    return `${formatRange(annotation.original)} -> ${formatRange(annotation.generated)}`
  })
}
function annotatedMappings ( map ) { const smc = new SourceMapConsumer ( map ) const annotations = { } smc . eachMapping ( ( mapping ) => { let annotation = ( annotations [ mapping . generatedLine ] = annotations [ mapping . generatedLine ] || { ... mapping , original : { start : [ mapping . originalLine , mapping . originalColumn ] , end : [ mapping . originalLine , mapping . originalColumn ] , } , generated : { start : [ mapping . generatedLine , mapping . generatedColumn ] , end : [ mapping . generatedLine , mapping . generatedColumn ] , } , } ) annotation . generated . end [ 0 ] = mapping . generatedLine annotation . generated . end [ 1 ] = mapping . generatedColumn annotation . original . end [ 0 ] = mapping . originalLine annotation . original . end [ 1 ] = mapping . originalColumn } ) return Object . values ( annotations ) . map ( ( annotation ) => { return ` ${ formatRange ( annotation . original ) } ${ formatRange ( annotation . generated ) } ` } ) }
An string annotation that represents a source map
 It's not meant to be exhaustive just enough to
 verify that the source map is working and that
 lines are mapped back to the original source
An string annotation that represents a source map It ' s not meant to be exhaustive just enough to verify that the source map is working and that lines are mapped back to the original source