code: function parseStacktrace(e, scriptName) {
      var UNKNOWN_FUNCTION = '<unknown>';
      var node = /^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
      var lines = e.stacktrace.split('\n');
      var stack = [];
      var parts;
      var element;
  
      for (var i = 0, j = lines.length; i < j; ++i) {
          if ((parts = node.exec(lines[i]))) {
              element = {
                  'file': parts[2],
                  'method': parts[1] || UNKNOWN_FUNCTION,
                  'line': parts[2] === scriptName ? +parts[3] - scriptContentLineOffset : +parts[3],
                  'column': parts[4] ? +parts[4] : null
              };
          } else {
              continue;
          }
          stack.push(element);
      }
  
      return stack;
  }
docs: based on https://github.com/errwischt/stacktrace-parser eslint-disable-next-line no-unused-vars