sourcemap-viz

0.0.3 • Public • Published

sourcemap-viz

Quick and dirty sourcemap visualizer.

Given sample.json:

{
  "version": 3,
  "sources": [
    "check-stack.ts"
  ],
  "names": [
    "stack1",
    "Error",
    "stack",
    "stack2",
    "stack3"
  ],
  "mappings": ";;;;;;;AAAA;AACO,MAAMA,MAAM,GAAG,IAAIC,KAAJ,GAAYC,KAA3B;;AACA,MAAMC,MAAM,GAAG,IAAIF,KAAJ,GAAYC,KAA3B;;AACA,MAAME,MAAM,GAAG,IAAIH,KAAJ,GAAYC,KAA3B",
  "sourcesContent": [
    "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nexport const stack1 = new Error().stack!\nexport const stack2 = new Error().stack!\nexport const stack3 = new Error().stack!\n"
  ]
}
➝  cat sample.json | sourcemap-viz
check-stack.ts:

  /* eslint-disable @typescript-eslint/no-non-null-assertion */
  export const stack1 = new Error().stack!
  export const stack2 = new Error().stack!
  export const stack3 = new Error().stack!


  01:00 =>  08:00 /* eslint-...
  02:07 =>  09:00 const stac...
  02:13 =>  09:06 stack1 = n...
  02:19 =>  09:12  = new Err...
  02:22 =>  09:15 new Error(...
  02:26 =>  09:19 Error().st...
  02:22 =>  09:24 new Error(...
  02:34 =>  09:27 stack!...
  02:07 =>  09:32 const stac...
  03:07 =>  11:00 const stac...
  03:13 =>  11:06 stack2 = n...
  03:19 =>  11:12  = new Err...
  03:22 =>  11:15 new Error(...
  03:26 =>  11:19 Error().st...
  03:22 =>  11:24 new Error(...
  03:34 =>  11:27 stack!...
  03:07 =>  11:32 const stac...
  04:07 =>  13:00 const stac...
  04:13 =>  13:06 stack3 = n...
  04:19 =>  13:12  = new Err...
  04:22 =>  13:15 new Error(...
  04:26 =>  13:19 Error().st...
  04:22 =>  13:24 new Error(...
  04:34 =>  13:27 stack!...
  04:07 =>  13:32 const stac...

Installation

npm i -g sourcemap-viz

LICENSE

MIT

Package Sidebar

Install

npm i sourcemap-viz

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

4.54 kB

Total Files

3

Last publish

Collaborators

  • thlorenz