1.0.8 • Published 2 years ago

source-map-to-code v1.0.8

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

source-map-to-code

Get the source code information from the compiled file and error information location through source map

install

yarn add source-map-to-code

example

const { printSourceCodeInfo, getSourceCodeInfo } = require('source-map-to-code')

printSourceCodeInfo({
    filePath: './build/static/js/main.4e7cf41f.js',
    position: {
        line: 3,
        column: 0
    }
})

// print

Source code file path:
  ./es6/test.js

Source code snippets:
  2  var isTest = true
  3  const version = window.version   <------ Error(3:0)
  4  console.log(version)
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.0

5 years ago