Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thlorenz/parse-base64vlq-mappings
Parses out base64 VLQ encoded mappings.
https://github.com/thlorenz/parse-base64vlq-mappings
Last synced: 13 days ago
JSON representation
Parses out base64 VLQ encoded mappings.
- Host: GitHub
- URL: https://github.com/thlorenz/parse-base64vlq-mappings
- Owner: thlorenz
- License: mit
- Created: 2013-03-13T11:30:25.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-07-06T01:36:50.000Z (over 11 years ago)
- Last Synced: 2024-12-10T08:27:08.054Z (about 1 month ago)
- Language: JavaScript
- Size: 154 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# parse-base64vlq-mappings [![build status](https://secure.travis-ci.org/thlorenz/parse-base64vlq-mappings.png)](http://travis-ci.org/thlorenz/parse-base64vlq-mappings)
Parses out base64 VLQ encoded mappings.
The code is mostly lifted from [mozilla's source-map module](https://github.com/mozilla/source-map) in order to separate
out the parse function into its own module.```js
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.