How to use the @favware/querystring.stringify function in @favware/querystring

To help you get started, we’ve selected a few @favware/querystring 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 lmmfranco / nintendo-switch-eshop / src / nintendo-switch-eshop.ts View on Github external
if (shop) {
    shopFilters = isStringArray(shop) ? shop.map(value => shopMapper(value)) : shopMapper(shop);
  }

  const sortingOptions = {
    direction: constants.US_GET_GAMES_OPTIONS.direction,
    sortBy: constants.US_GET_GAMES_OPTIONS.sort,
  };

  const body = {
    body: JSON.stringify({
      requests: [
        {
          indexName: `noa_aem_game_en_us${(sortingOptions.sortBy && sortingOptions.direction
            ? `_${sortingOptions.sortBy}_${sortingOptions.direction}` : '')}`,
          params: stringify({
            facetFilters: [
              [ constants.US_GET_GAMES_OPTIONS.system ],
              shopFilters
            ],
            hitsPerPage: limit,
            page,
          }),
        }
      ],
    }),
    headers: constants.US_ALGOLIA_HEADERS,
    method: 'POST',
  };

  try {
    if (hasProp(options, 'limit')) {

@favware/querystring

Awesome and robust querystring

MIT
Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Popular @favware/querystring functions