node_modules/.cache/esm/6826f6c2f3ed612d.js
/**
 * Parses a query string according the connection string spec.
 *
 * @param {String} query The query string to parse
 * @return {Object|Error} The parsed query string as an object, or an error if one was encountered
 */
Parses a query string according the connection string spec.
@param {String} query The query string to parse
@return {Object|Error} The parsed query string as an object, or an error if one was encountered
Parses a query string according the connection string spec . @param { String } query The query string to parse @return { Object|Error } The parsed query string as an object or an error if one was encountered
function parseQueryString(query) {
  const result = {};
  let parsedQueryString = qs.parse(query);
  for (const key in parsedQueryString) {
    const value = parsedQueryString[key];
    if (value === '' || value == null) {
      return new MongoParseError('Incomplete key value pair for option');
    }
    result[key.toLowerCase()] = parseQueryStringItemValue(value);
  }
  if (result.wtimeout && result.wtimeoutms) {
    delete result.wtimeout;
    _f3e‍.g.console.warn('Unsupported option `wtimeout` specified');
  }
  return Object.keys(result).length ? result : null;
}
function parseQueryString ( query ) { const result = { } ; let parsedQueryString = qs . parse ( query ) ; for ( const key in parsedQueryString ) { const value = parsedQueryString [ key ] ; if ( value === '' || value == null ) { return new MongoParseError ( 'Incomplete key value pair for option' ) ; } result [ key . toLowerCase ( ) ] = parseQueryStringItemValue ( value ) ; } if ( result . wtimeout && result . wtimeoutms ) { delete result . wtimeout ; _f3e‍.g . c o nsole.w a rn(' U nsupported option `wtimeout` specified'); } return Object . keys ( result ) . length ? result : null ; }
Parses a query string according the connection string spec.
Parses a query string according the connection string spec .
// special cases for known deprecated options