code: function checkTLSOptions(queryString) {
    const queryStringKeys = Object.keys(queryString);
    if (
      queryStringKeys.indexOf('tlsInsecure') !== -1 &&
      (queryStringKeys.indexOf('tlsAllowInvalidCertificates') !== -1 ||
        queryStringKeys.indexOf('tlsAllowInvalidHostnames') !== -1)
    ) {
      throw new MongoParseError(
        'The `tlsInsecure` option cannot be used with `tlsAllowInvalidCertificates` or `tlsAllowInvalidHostnames`.'
      );
    }
  
    const tlsValue = assertTlsOptionsAreEqual('tls', queryString, queryStringKeys);
    const sslValue = assertTlsOptionsAreEqual('ssl', queryString, queryStringKeys);
  
    if (tlsValue != null && sslValue != null) {
      if (tlsValue !== sslValue) {
        throw new MongoParseError('All values of `tls` and `ssl` must be the same.');
      }
    }
  }
docs: Checks a query string for invalid tls options according to the URI options spec.
  
  @param {string} queryString The query string to check
  @throws {MongoParseError}