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

url-query-builder

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-query-builder

Simple add/change/delete url query

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
342
increased by67.65%
Maintainers
1
Weekly downloads
 
Created
Source

URL Query Builder

Usage

// nodejs style
var URLQueryBuilder = require("url-query-builder");
// es6 way
import URLQueryBuilder from "url-query-builder";

// create instance
var q = new URLQueryBuilder("example.com"); // => example.com?
// with query in url
var q1 = new URLQueryBuilder("example.com?a=b"); // => example.com?a=b&
// with query by param, can be string
var q2 = new URLQueryBuilder("example.com", "a=b"); // => example.com?a=b&
// or object
var q3 = new URLQueryBuilder("example.com", {a: "b"}); // => example.com?a=b&


// add queries
q.add("a", "b") // => example.com?a=b&
q.add({a: "b"}) // => example.com?a=b&

// change queries
q.change("a","c") // => example.com?a=c&

// delete queries
q.delete("a") // => example.com?

// reset queries
q.reset(); // => example.com?
q.reset({a: "b"}); // => example.com?a=b&

Install

npm i url-query-builder

Test

  • mocha.js
  • should.js
npm run test

Keywords

FAQs

Package last updated on 11 Apr 2016

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