Comments (2)
It appears to be this code:
chrome: function(e) {
return e.stack.replace(/^.*?\n/, '').
replace(/^.*?\n/, '').
replace(/^.*?\n/, '').
replace(/^[^\(]+?[\n$]/gm, '').
replace(/^\s+at\s+/gm, '').
replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@').
split("\n");
}
I use the following code instead
return e.stack.replace(/^.*?\n/, ''). // Remove the first line which is the exception message
replace(/^\s*/, ''). // Clean up the white space at the beginning of the string
replace(/\s*\n/, '\n'). // Clean up the white space before a new line
replace(/\s*\n/, '\n'). // Clean up the white space after a new line
replace(/\s*$/, ''). // Clean up the white space at the end of the string
replace(/Object.<anonymous>\s*\(/gm, '{anonymous}()@('). // re-word Object.<anonymous> as {anonymous}()@
split('\n');
Although I don't really understand what the original code is trying to do. Its all Regular Expression voodoo to me!
from stacktrace.js.
I've updated the Chrome mode to match others.
from stacktrace.js.
Related Issues (20)
- Arguments not getting populated in trace HOT 1
- Am not able to convert in to non minified response from minified in componentDidCatch
- Still active? HOT 2
- Promise rejection: Cannot parse given Error HOT 2
- Provide a simple API to interact with window.onerror
- Way to convert StackFrames back into a traditional Error stack
- getSync() available but no fromErrorSync() available
- Cert for https://www.stacktracejs.com/ expired HOT 3
- inside of object, get class name
- Extremely high memory usage HOT 5
- define cannot be used indirect stacktrace-gps
- Angular 10 build warning - CommonJS or AMD dependencies HOT 2
- Add defensive code HOT 1
- Missing documentation!
- ESM Support HOT 2
- runtime loading of source maps? HOT 1
- stacktrace-gps opitonal? HOT 1
- How can I see original functions names/files names with Nexj.js HOT 4
- Explanation needed: Why is parsed stack different when using StackTrace.fromError with option offline=true and offline=false?
- Official Website Down
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stacktrace.js.