How to use jquery-param - 8 common examples

To help you get started, we’ve selected a few jquery-param examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dremio / dremio-oss / dac / ui / src / utils / resourcePathUtils / history.js View on Github external
toHref(resourcePath, previousLocation) {
    const resourcePathParts = resourcePath.split('/');

    return previousLocation.pathname + '?' + param(
      {...previousLocation.query, version: resourcePathParts[4], history: true}
    );
  }
}
github othree / fetcher / fetcher.es6.js View on Github external
param(data) {
    return param(data);
  }
github airbnb / react-sketchapp / examples / foursquare-maps / src / getVenues.js View on Github external
export default () => {
  const query = 'burger';
  const latitude = '37.773972';
  const longitude = '-122.431297';

  const params = param({
    v: '20161016',
    ll: [latitude, longitude].join(','),
    query,
    limit: 15,
    intent: 'checkin',
    client_id: 'BCUJZ2MSKUWJC2Q5HVIYZLHRWGFJ2OFPKPLBP1NOBNR3VW5R',
    client_secret: 'Q10HUP5APBQOYNTPABSH4CSKRGEAI2CXIYULYGG0EZYUUWUZ',
  });

  return fetch(`https://api.foursquare.com/v2/venues/search?${params}`)
    .then(res => res.json())
    .then(data => ({
      venues: data.response.venues,
      latitude,
      longitude,
      query,
github Exelord / ember-custom-actions / addon / utils / url-builder.js View on Github external
export default function(url, path, queryParams) {
  let query = param(queryParams);
  let pathUrl = url.charAt(url.length - 1) === '/' ? `${url}${path}` : `${url}/${path}`;

  return query ? `${pathUrl}?${query}` : pathUrl;
}
github dremio / dremio-oss / dac / ui / src / actions / jobs / jobs.js View on Github external
function fetchItemsForFilter(tag, filter = '', limit = '') {
  let params = '';
  if (filter || limit) {
    params = param({filter, limit});
  }
  return {
    [RSAA]:{
      types: [
        ITEMS_FOR_FILTER_JOBS_REQUEST,
        {
          type: ITEMS_FOR_FILTER_JOBS_SUCCESS,
          meta: {tag}
        },
        ITEMS_FOR_FILTER_JOBS_FAILURE
      ],
      method: 'GET',
      endpoint: `${API_URL_V2}/jobs/filters/${tag}${params}`
    }
  };
}
github Lobos / refetch / src / util.js View on Github external
export function solveUrl (url, data) {
  let queryString = param(data);
  return url + (url.indexOf('?') >= 0 ? '&' : '?') + queryString;
}

jquery-param

equivalent function to jQuery.param

MIT
Latest version published 8 months ago

Package Health Score

61 / 100
Full package analysis

Popular jquery-param functions