Source maps for Emacs

Source maps turn out to be a handy tool not only for debugging minified
code, but also for debugging the minifier ;-) My use case is this: (1)
minify a big JS code, but request indented output. Then open that uglified
code in Emacs and look at it, tryin' to figure out if compression is correct
or wrong, and how could I make it better. It's extremely useful at this
point if I could quickly jump to the original source, at the location where
the thing under the cursor is coming from, starting from the minified
file.

So I wrote a quick'n'dirty script that takes a source map and outputs
information about the original location at-a-given-point. Here's the script,
I'm calling it source-map-query.js:

This generates the compressed code in jq.js and the source map
in jq.js.map. Next I open jq.js in Emacs, go to some
random position and press C-M-., and it takes me (close) to the
original location of the token under the cursor in jquery-1.8.1.js.

This turns out to be useful for debugging my source map generation too.