code: function assertTlsOptionsAreEqual(optionName, queryString, queryStringKeys) {
    const queryStringHasTLSOption = queryStringKeys.indexOf(optionName) !== -1;
  
    let optionValue;
    if (Array.isArray(queryString[optionName])) {
      optionValue = queryString[optionName][0];
    } else {
      optionValue = queryString[optionName];
    }
  
    if (queryStringHasTLSOption) {
      if (Array.isArray(queryString[optionName])) {
        const firstValue = queryString[optionName][0];
        queryString[optionName].forEach(tlsValue => {
          if (tlsValue !== firstValue) {
            throw new MongoParseError('All values of ${optionName} must be the same.');
          }
        });
      }
    }
  
    return optionValue;
  }
docs: Checks a query string to ensure all tls/ssl options are the same.
  
  @param {string} key The key (tls or ssl) to check
  @param {string} queryString The query string to check
  @throws {MongoParseError}
  @return The value of the tls/ssl option