lib/modules/url.js
function setSearch(uri) {
  if (typeof uri.search === 'string' || uri.query === undefined) return;

  if (typeof uri.query === 'string') {
    uri.search = '?' + uri.query;
    return;
  }

  var name, filled = false;
  uri.search = '?';

  for (name in uri.query) {
    filled = true;
    uri.search += name + '=' + uri.query[name] + '&';
  }

  uri.search = uri.search.substr(0, uri.search.length - 1);
}
function setSearch(uri) {
  if (typeof uri.search === 'string' || uri.query === undefined) return;

  if (typeof uri.query === 'string') {
    uri.search = '?' + uri.query;
    return;
  }

  var name, filled = false;
  uri.search = '?';

  for (name in uri.query) {
    filled = true;
    uri.search += name + '=' + uri.query[name] + '&';
  }

  uri.search = uri.search.substr(0, uri.search.length - 1);
}
function setSearch ( uri ) { if ( typeof uri . search === 'string' || uri . query === undefined ) return ; if ( typeof uri . query === 'string' ) { uri . search = '?' + uri . query ; return ; } var name , filled = false ; uri . search = '?' ; for ( name in uri . query ) { filled = true ; uri . search += name + '=' + uri . query [ name ] + '&' ; } uri . search = uri . search . substr ( 0 , uri . search . length - 1 ) ; }
construct search property
construct search property