code: function(url) {
  
        // If the URL is an object with toString, do that
        if (typeof url === 'object' && typeof url.toString === 'function') {
          url = url.toString();
        }
  
        var query_string;
  
        // If the url does not have a query, return a blank string
        if (url.indexOf('?') === -1 && url.indexOf('=') === -1) {
          query_string = '';
        } else {
          var parts = url.split('?');
          var part = parts.slice(parts.length === 1 ? 0 : 1);
          query_string = '?' + part.join('?').split('#')[0];
        }
  
  
        return query_string;
      }
docs: Extract a query string from a url
  @param  {string} url The url
  @return {string}     The extracted query string