Skip to content

Instantly share code, notes, and snippets.

@apollo13
Created December 20, 2016 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apollo13/159529a5366ed2c0d8b66223a0541695 to your computer and use it in GitHub Desktop.
Save apollo13/159529a5366ed2c0d8b66223a0541695 to your computer and use it in GitHub Desktop.
parseBacktrace: function (backtrace) {
if (!backtrace) {
return null;
}
let result = backtrace.match(/^(.+?)\s*:\s*(\d+)$/);
if (!result || result.length != 3) {
return backtrace;
}
return {
url: result[1],
line: result[2]
};
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment