sourcemap-view
View the original code from the sourcemap based on the error lineno and colno.
Installation
npm install sourcemap-view
Why would you want to do that?
When js throws an exception, we can view the original code without Chrome Console or Other.
Uncaught TypeError: Cannot read property 'a' of undefined
at a.getSameError (app.07cd8612.js:1:3842)
at app.07cd8612.js:1:3357
Usage
const fs = ;const sourcemapView = ; const sourcemapRaw = fs; const view = ; ; // { file: './HelloWorld.js', lineNo: 43, colNo: 29, name: 'a', content: <Original Code> }; // { file: './HelloWorld.js', lineNo: 35, colNo: 0, name: 'setTimeout', content: <Original Code> }
License
MIT.