update-query-param

0.1.0 • Public • Published

update-query-param

A Node.js module which update query param from url with given value.

Installation

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]

Usage

Assume we have a query string with a value of:

"?color=red";

Configuring

const updateQueryParam = require('update-query-param')

updateQueryParam({ 
  key: 'color',
  value: 'blue',
}); // ?color=blue

License

Copyright © 2021, Tanvir Rahman. Released under the MIT License.


/update-query-param/

    Package Sidebar

    Install

    npm i update-query-param

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    3.63 kB

    Total Files

    4

    Last publish

    Collaborators

    • tanvir_rahman