A Node.js module which update query param from url with given value.
npm install update-query-param --save
Params: Object which needs -
- key - Key to update
- value - Value to update
- url - url to update [Default current url]
Assume we have a query string with a value of:
"?color=red";
const updateQueryParam = require('update-query-param')
updateQueryParam({
key: 'color',
value: 'blue',
}); // ?color=blue
Copyright © 2021, Tanvir Rahman. Released under the MIT License.