MCPcopy Index your code
hub / github.com/TruthHun/BookStack / cleanStack

Function cleanStack

static/word2md/mammoth.browser.js:5194–5209  ·  view source on GitHub ↗
(stack)

Source from the content-addressed store, hash-verified

5192}
5193
5194function cleanStack(stack) {
5195 var ret = [];
5196 for (var i = 0; i < stack.length; ++i) {
5197 var line = stack[i];
5198 var isTraceLine = " (No stack trace)" === line ||
5199 stackFramePattern.test(line);
5200 var isInternalFrame = isTraceLine && shouldIgnore(line);
5201 if (isTraceLine && !isInternalFrame) {
5202 if (indentStackFrames && line.charAt(0) !== " ") {
5203 line = " " + line;
5204 }
5205 ret.push(line);
5206 }
5207 }
5208 return ret;
5209}
5210
5211function stackFramesAsArray(error) {
5212 var stack = error.stack.replace(/\s+$/g, "").split("\n");

Callers 3

checkForgottenReturnsFunction · 0.70
parseStackAndMessageFunction · 0.70
mammoth.browser.jsFile · 0.70

Calls 1

shouldIgnoreFunction · 0.70

Tested by

no test coverage detected