Package Exports
- load-source-map
- load-source-map/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (load-source-map) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
load-source-map
Given a source file location, will load any referenced (or inline) source map.
Result is a SourceMapConsumer.
Installation
$ npm install --save load-source-mapUsage
var loadSourceMap = require('load-source-map')
loadSourceMap(__filename, function (err, sourcemap) {
if (err) {
throw err
}
if (!sourcemap) {
// No source map found
return
}
console.log(sourcemap.originalPositionFor({
line: 3,
column: 10,
}))
// { source: 'some-file.js',
// line: 2,
// column: 2,
// name: null }
})License
MIT-licensed. See LICENSE.