code: function stack(e) {
    return {
      toString: function() {
        // first line is err.message, which we already show, so start from
        // second line
        return e.stack.substr(e.stack.indexOf('\n'));
      },
      toJSON: function() {
        return stacktrace.parse(e);
      }
    };
  }
docs: stack formatter helper