Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@gradeup/med-url
Advanced tools
Construct a url by passing query params as encoded uri or get the keys embedded into url as decoded values.
Construct a url by passing query params as encoded uri or get the keys embedded into url as decoded values.
npm install --save med-url
import MedUrl from 'med-url'; // Functionalities to MedUrl variable
MedUrl.set(url, options)
Folowing are the params to be passed :
option | used for |
---|---|
url | Url or object for construction of url |
options | Object for passing query params |
MedUrl.get(url, key)
Folowing are the params to be passed :
option | used for |
---|---|
url | Url or object for construction of url |
key | Key for getting value of a parameter |
MedUrl.set('https://google.co', { query: { a: 1, b: 'site' } })
// "https://google.co?a=1&b=site"
MedUrl.set('https://google.co?c=89', { query: { a: 1, b: 'site' } })
// "https://google.co?c=89&a=1&b=site"
MedUrl.set('https://google.co?c=89', { query: { a: 1, b: 'site google' } })
// "https://google.co?c=89&a=1&b=site%20google"
MedUrl.get("https://google.co?c=89&a=1&b=site%20google")
// {c: "89", a: "1", b: "site google"}
MedUrl.get("https://google.co?c=89&a=1&b=site%20google", "d")
// undefined
MedUrl.get("https://google.co?c=89&a=1&b=site%20google", "c")
// "89"
You can visit some links for reference:
FAQs
Construct a url by passing query params as encoded uri or get the keys embedded into url as decoded values.
We found that @gradeup/med-url demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.