When I have the files script.js (original), script.minified.js (minified), and script.minified.js.map (source map), how can I determine the position in the original file based on a random position in the minified file using the source map file?
For instance:
If I have a position in the minified file such as script.minified.js:100:30 (indicating the 100th line and 30th column in the minified file)
What I want to retrieve:
The corresponding position in the original file like script.js:200:30 (meaning it's the 200th line and 30th column in the original file)
An example pseudo function would be:
getOriginalPositionFromMinifiedPosition(minifiedJs, originalJs, sourceMapFile, row, column)
returns [originalRow, originalColumn]
There was a similar question asked but unfortunately left unanswered here Google Chrome: how to find original line from minified line using a source map?