
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.