0.0.0 • Published 8 months ago

url-query-utils v0.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

url-query-utils

Utility functions to handle url-query

Install

npm i url-query-utils

Usage

import {get, parse, set} from 'url-query-utils'

const url = "https://www.google.com/search?q=deno";
parse(url)
// {path: "https://www.google.com/search", params: { q: "deno" }})

get(url, "q")
// "deno"

set(url, {q: "node"})
// https://www.google.com/search?q=node

set(url, {lang: "en"})
// https://www.google.com/search?q=deno&lang=en
0.0.0

8 months ago