"use strict"; module.exports = function stripErrorFromStack(stack) { // FIXME: This will not work reliably in all browsers! return stack .split("\n") .filter((line) => { return /^\s*at .+\)$/.test(line); }) .join("\n"); };