How to use the qs/dist/qs.parse function in qs

To help you get started, we’ve selected a few qs 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 nkbt / component-router / src / reducer.js View on Github external
export const restoreLocation = (state, {location, locationType = Constants.LOCATION_HISTORY}) => {
  const {defaultParams} = state;
  const {pathname, search, hash} = location;
  const newQuery = safeQuery(parse(search.substr(1), {strictNullHandling: true}));
  const newState = changeParams({...state, locationType}, {
    query: {...defaultParams, ...newQuery}
  });

  return {...newState, pathname, hash, locationType};
};

qs

A querystring parser that supports nesting and arrays, with a depth limit

BSD-3-Clause
Latest version published 1 month ago

Package Health Score

94 / 100
Full package analysis