append-search-params
v1.0.0
Published
A really lightweight wrapper to append searchParams to a URL by passing an object. Does not use any external packages, instead utilizes the modern URL object.
Downloads
6
Readme
append-search-params
A really lightweight wrapper to append searchParams to a URL by passing an object. Does not use any external packages, instead utilizes the modern URL object.
Usage
import { appendSearchParams } from "append-search-params";
appendSearchParams("https://www.dannyvanholten.com", { query: "param "});
appendSearchParams(new Url("https://www.dannyvanholten.com?previous=param"), { query: "param "});