lib/init.js
function extendUrlWithQuery(url, queryArgs) {
  if (_.isEmpty(queryArgs)) {
    return url;
  }

  var parts = urlLib.parse(url);
  var query = _.extend(qs.parse(parts.query), queryArgs);
  parts.search = '?' + qs.stringify(query);
  return urlLib.format(_.pick(
    parts,
    'protocol',
    'slashes',
    'host',
    'auth',
    'pathname',
    'search',
    'hash'
  ));
}
function extendUrlWithQuery(url, queryArgs) {
  if (_.isEmpty(queryArgs)) {
    return url;
  }

  var parts = urlLib.parse(url);
  var query = _.extend(qs.parse(parts.query), queryArgs);
  parts.search = '?' + qs.stringify(query);
  return urlLib.format(_.pick(
    parts,
    'protocol',
    'slashes',
    'host',
    'auth',
    'pathname',
    'search',
    'hash'
  ));
}
function extendUrlWithQuery ( url , queryArgs ) { if ( _ . isEmpty ( queryArgs ) ) { return url ; } var parts = urlLib . parse ( url ) ; var query = _ . extend ( qs . parse ( parts . query ) , queryArgs ) ; parts . search = '?' + qs . stringify ( query ) ; return urlLib . format ( _ . pick ( parts , 'protocol' , 'slashes' , 'host' , 'auth' , 'pathname' , 'search' , 'hash' ) ) ; }
Retains the url fragment and query args from url, not overridden via queryArgs
Retains the url fragment and query args from url not overridden via queryArgs