constructor(local, domain, resource) {
    if (typeof domain !== "string" || !domain) {
      throw new TypeError(`Invalid domain.`);
    }

    this.setDomain(domain);
    this.setLocal(typeof local === "string" ? local : "");
    this.setResource(typeof resource === "string" ? resource : "");
  }
JID implements
- XMPP addresses according to RFC6122
- XEP-0106: JID Escaping

@see http://tools.ietf.org/html/rfc6122#section-2
@see http://xmpp.org/extensions/xep-0106.html