Socket
Book a DemoInstallSign in
Socket

url-query-handle

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-query-handle

It allows you to append / remove query params from browser url

1.0.9
latest
Source
npmnpm
Version published
Weekly downloads
171
37.9%
Maintainers
1
Weekly downloads
 
Created
Source

url-query-handle

It allows you to append / remove query params from browser url

It can used by running following command inside your project folder

npm install --save-dev url-query-handle // To save it locally npm install --g url-query-handle // To save it globally

Usage:

var urlHandle = require('url-query-handle');

To Add Param to URL

urlHandle.addParam('www.abc.com','a=123');

// www.abc.com?a=123

urlHandle.addParam('www.abc.com?b=456','a=123');

// www.abc.com?b=456&a=123

To Add Multiple Params to URL

urlHandle.addMultipleParams("www.abc.com", {a:123, b:456});

// www.abc.com?b=456&a=123

To Remove Param from URL

urlHandle.removeParam("www.abc.com?a=123",'a');

// www.abc.com

urlHandle.removeParam("www.abc.com?b=456&a=123",'a');

// www.abc.com?b=456

To Fetch Param value

urlHandle.getParamValue("www.abc.com?a=123&b=456", 'a');

//123

Keywords

query

FAQs

Package last updated on 06 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.