Replace URLs in stack traces with original sources
MIT License
Replace stack traces with original sources using source-map. For node and the browser.
npm install source-mapper
var sourceMapper = require('source-mapper');
var extracted = sourceMapper.extract(js);
var throughStream = sourceMapper.stream(extracted.map);
extract(string)
extracts an inline source map from the given string. Thejs
without source maps and a map
with sourceconsumer(map)
returns a source map consumer for the given map
.line(consumer, line[, offset])
maps the given line to the original sourceoffset
is given, it is substracted from the linestream(consumer[, offset])
returns a through2 stream that replaces URLsoffset
is given, it is substracted from the line number.stream(map[, offset])
returns a through2 stream that replaces URLs inoffset
is given, it is substracted from the line number.Clone the repository and then run:
npm install
npm test
MIT