constructor(type, options = {}) {
    super(type);

    this[kCode] = options.code === undefined ? 0 : options.code;
    this[kReason] = options.reason === undefined ? '' : options.reason;
    this[kWasClean] = options.wasClean === undefined ? false : options.wasClean;
  }
Create a new `CloseEvent`.

@param {String} type The name of the event
@param {Object} [options] A dictionary object that allows for setting
    attributes via object members of the same name
@param {Number} [options.code=0] The status code explaining why the
    connection was closed
@param {String} [options.reason=''] A human-readable string explaining why
    the connection was closed
@param {Boolean} [options.wasClean=false] Indicates whether or not the
    connection was cleanly closed