Fetch and apply sourcemaps in logs and stack traces originating from the browser or puppeteer.
npm install apply-sourcemapsFetch and apply sourcemaps in logs and stack traces originating from the browser or puppeteer.
npm i apply-sourcemaps | pnpm add apply-sourcemaps | yarn add apply-sourcemaps |
applySourceMaps(x, mapFn) =>
createDeferredCache<T, U>(fn) =>
fetch(input, init) fetchSourceMap(key, args) getCodeFrame(message, { column, line, originalUrl, url }) string{#
message
}
getCodeFrame(message, { column, line, originalUrl, url }) =>
getIt(key, args) string [ RealLocation ]#
key #
args
getIt(key, args) =>
getRealLocationFromUrlLineCol(real) #
real
getRealLocationFromUrlLineCol(real) =>
getSourceMap(url, content) log(formatter, args) - @babel/code-frame by The Babel Team – Generate errors that contain a code frame that point to source locations.
- convert-source-map by Thorsten Lorenz – Converts a source-map from/to different formats and allows adding/changing properties.
- debug by Josh Junon – Lightweight debugging utility for Node.js and the browser
- everyday-utils by stagas – Everyday utilities
- fetch-h2 by Gustaf Räntilä – HTTP/1+2 Fetch API client for Node.js
- source-map by Nick Fitzgerald – Generates and consumes source maps
All contributions are welcome!