sourcemap-codec
Encode/decode the mappings
property of a sourcemap.
Why?
Sourcemaps are difficult to generate and manipulate, because the mappings
property – the part that actually links the generated code back to the original source – is encoded using an obscure method called Variable-length quantity. On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
This package makes the process slightly easier.
Installation
npm install sourcemap-codec
Usage
; var decoded = ; assert; var encoded = ;assert;
License
MIT