code: function parsePairs(str, limit) {
    const parts = str.split('&');
    const data = Object.create(null);
  
    if (parts.length > limit)
      return data;
  
    assert(!limit || parts.length <= limit, 'Too many keys in querystring.');
  
    for (const pair of parts) {
      const index = pair.indexOf('=');
  
      let key, value;
      if (index === -1) {
        key = pair;
        value = '';
      } else {
        key = pair.substring(0, index);
        value = pair.substring(index + 1);
      }
  
      key = unescape(key);
  
      if (key.length === 0)
        continue;
  
      value = unescape(value);
  
      if (value.length === 0)
        continue;
  
      data[key] = value;
    }
  
    return data;
  }
docs: /*
  Helpers