Package Exports
- stacktrace-gps
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 (stacktrace-gps) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stacktrace-gps - Turn partial code location into precise code location
Usage
var stackframe = new StackFrame(undefined, [], 'http://localhost:3000/file.js', 100, 0);
var callback = function myCallback(foundFunctionName) { console.log(foundFunctionName); };
// Such meta. Wow
var errback = function myErrback(error) { console.log(StackTrace.fromError(error)); };
var gps = new StackTraceGPS();
// Get function name from location information
gps.findFunctionName(stackframe, callback, errback); // => 'functionName'
// Better location/name information from source maps
gps.getMappedLocation(stackframe, callback, errback); // => {source: './test.js', line: 2, column: 9, name: 'bar'}
Installation
npm install stacktrace-gps
bower install stacktrace-gps