
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
queryzz - a lightweight JS library for manipulating URL query parameters. Get, set, and format queries easily.
queryzz - a lightweight JS library for manipulating URL query parameters. Get, set, and format queries easily.
npm i queryzz
import { getQuery } from 'queryzz'
getQuery()
Format query string from an object.
const query = { value: 'test', field: ['hi', 'hello'] }
formatQuery(query)
// => value=test&field=hi&field=hello
const query = { value: 'https://google.com' }
formatQuery(query, true)
// => value=https%3A%2F%2Fgoogle.com
const query = { value: 'https://google.com' }
formatQuery(query, false)
// => value=https://google.com
Get query from an url.
// URL: /?value=test&field=hi&field=hello
getQuery()
// => { value: 'test', field: ['hi', 'hello'] }
getQuery('value=test&field=hi&field=hello')
// => { value: 'test', field: ['hi', 'hello'] }
// URL: /?value=test&field=hi
getQuery({ arrays: ['value'] })
// => { value: ['test'], field: 'hi' }
// URL: /?value=test&field=hi&value=123&test=true
getQuery()
// => { value: ['test', 123], field: 'hi', test: true }
getQuery({
source: 'value=test&field=hi&value=123&test=true',
parse: false
})
// => { value: ['test', '123'], field: 'hi', test: 'true' }
Set query to the url.
setQuery({ test: 'value' })
// => URL: /?test=value
setQuery({ test: ['12', '34'] })
// => URL: /?test=12&test=34
// /?test=value&field=test
setQuery({ test: 'field' }, { saveOld: true })
// => URL: /?test=value&test=field&field=test
// URL: /?test=value#someHash
setQuery({ test: 'value' }, { saveHash: false })
// => URL: /?test=value
const [search, setSearch] = useQuery('search')
setSearch('test')
// => URL: /?search=test
// URL: /?search=test
const [search, setSearch] = useQuery('search', { array: true })
console.log(search)
// => ['test']
setSearch(['test', 'test2'])
// => URL: /?search=test&search=test2
// URL: /?page=1
const [page, setPage] = useQuery('page', { parse: false })
console.log(page)
// => '1'
const search = useQuery('search')
search.value = 'test'
// => URL: /?search=test
// URL: /?search=test
const search = useQuery('search', { array: true })
console.log(search.value)
// => ['test']
search.value = ['test', 'test2']
// => URL: /?search=test&search=test2
// URL: /?page=1
const page = useQuery('page', { parse: false })
console.log(page.value)
// => '1'
FAQs
queryzz - a lightweight JS library for manipulating URL query parameters. Get, set, and format queries easily.
We found that queryzz demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.