Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

append-querystring

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

append-querystring

Append anything to a URL's query-string

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

append-querystring

Append anything to a URL's query-string.

Install

Using npm:

npm install append-querystring --save

Example

const append = require('append-querystring');

const original = 'http://landing-page.com/?s1=sid1&sid2=sid3';
const result = append("http://click-url.com/?affid=1", original, {object_format_sid: "Hello Friends"});

console.log(result);
// Output: http://click-url.com/?affid=1&s1=sid1&sid2=sid3&object_format_sid=Hello%20Friends

Usage

The exported function takes a base URL as its first argument, followed by any number of additional arguments that can be:

  • URL strings
  • Query string fragments (with or without a leading '?')
  • Objects with key-value pairs to be added to the query string

The function returns a new URL with all the query parameters combined.

FAQs

Package last updated on 17 Nov 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc