code: function stackTrace(e) {
  
      var trace = [];
  
      // Remove node.js trace pollutants:
      var stack = (e.stack || e.stacktrace).replace(/at Module._compile \(module\.js:\d+:\d+\)[\s\S]+$/, '');
  
      var match;
      var regex = /(?:at (?!<)(?:.+?\()?|@).*?(.+?):(\d+)(?=:\d+)?/g;
  
      while (match = regex.exec(stack)) {
        trace.push({
          file: match[1],
          line: +match[2]
        });
      }
  
      return trace;
  
    }
docs: Produce an array of {file:..., line:...} objects from the
  native stack trace