项目作者: teoxoy

项目描述 :
Node.js stacktrace sourcemapper
高级语言: TypeScript
项目地址: git://github.com/teoxoy/sourcemap-stacktrace.git
创建时间: 2019-06-28T18:23:06Z
项目社区:https://github.com/teoxoy/sourcemap-stacktrace

开源协议:MIT License

下载


sourcemap-stacktrace

npm
GitHub

This package is more or less a stripped down reimplementation of node-source-map-support. It only exposes one function sourcemapStacktrace that returns the sourcemapped stacktrace. The main difference between the 2 is that node-source-map-support doesn’t expose the function used for sourcemapping a stacktrace. This is only useful in cases you need to use the function directly.

Usecases

Common usecases would be js frameworks that would like to send the stacktrace to the client for debugging and other libraries like apollo-server where you can use the formatError function to sourcemap the stacktrace of an error.

Install

  1. npm i sourcemap-stacktrace

Example

  1. import { sourcemapStacktrace } from 'sourcemap-stacktrace'
  2. const mappedStack = sourcemapStacktrace(stacktrace)