Pure functional querystring parser and manager made with declarative ramda pipelines.
- Handles also lists of values
- Works with non-Latin charachters
- Customizable behaviuor with point-free functional building blocks
- Well tested since made by pure functions
- Is decorated by your project's own side effects
Copy lib folder to your utilities :-)
To use lib you have to decorate it by getter/setter route side effects, adopted in your project, and handle it as a singleton. Here's an example of React app using history object for navigation:
import {qs as ramdaQs} from 'lib';
export const qs = ramdaQs(() => window.location.search, (search) => history.push({search}));
Adds a value to a list at a given key
Removes a value from a list at a given key
Sets a value at a given key
Gets a value at a given key
Helper functions
For more examples please look into tests