JSPM

parse-base64vlq-mappings

0.1.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3987
  • Score
    100M100P100Q119097F
  • License MIT

Parses out base64 VLQ encoded mappings.

Package Exports

  • parse-base64vlq-mappings

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-base64vlq-mappings) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

parse-base64vlq-mappings build status

Parses out base64 VLQ encoded mappings.

The code is mostly lifted from mozilla's source-map module in order to separate out the parse function into its own module.

var parse = require('parse-base64vlq-mappings');

var mappings = parse('AAAA;AACA;AACA;AACA;AACA');
console.log(mappings);
[ { generated: { line: 1, column: 0 },
    original: { line: 1, column: 0 } },
  { generated: { line: 2, column: 0 },
    original: { line: 2, column: 0 } },
  { generated: { line: 3, column: 0 },
    original: { line: 3, column: 0 } },
  { generated: { line: 4, column: 0 },
    original: { line: 4, column: 0 } },
  { generated: { line: 5, column: 0 },
    original: { line: 5, column: 0 } } ]

Caveat

Main intended use is either for testing generated mappings or to add offsets to existing mappings.

Therefore is is assumed that all mappings relate to the same generated/original file, i.e. only information about generated line and column vs. original line and column is preserved.

Additionally all name information is disregarded during the parse.