An open API service indexing awesome lists of open source software.

https://github.com/halfzebra/stack-trace-beautifier

👓 Decrypt errors from minified code
https://github.com/halfzebra/stack-trace-beautifier

error-monitoring sourcemaps stacktrace

Last synced: 7 months ago
JSON representation

👓 Decrypt errors from minified code

Awesome Lists containing this project

README

          

# stack-trace-beautifier

A library for beautifying [stacktracejs/error-stack-parser](https://github.com/stacktracejs/error-stack-parser) stack-traces from minified client-side JavaScript using source-maps on the back-end.

Heavily inspired by [stacktracejs/stacktrace-gps](https://github.com/stacktracejs/stacktrace-gps)

## Usage

### Node.js

```js
const { createStackTraceBeautifier, stackTraceToString } = require('stack-trace-beautifier');

const stackTraceBeautifierInstance = createStackTraceBeautifier({
sourceMapsPath: './maps',
publicPath: '/',
cache: new Map()
});

stackTraceBeautifierInstance.beautifyStackTrace(stackFrames)
.then(stackTraceToString)
```