
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
url-search-params-delete
Advanced tools
A polyfill adding support for .delete(key,value) to URLSearchParams as discussed at https://github.com/whatwg/url/issues/335
A polyfill adding support for .delete(key,value)
to URLSearchParams
as discussed at https://github.com/whatwg/url/issues/335
const paramsString = "foo=1&foo=2&bar=3";
const searchParams = new URLSearchParams(paramsString);
searchParams.delete("foo", "2");
console.log(searchParams.toString()); // "foo=1&bar=3"
Install the npm package url-search-params-delete
and import it in your application code; a suitable location for this is usually at the top of your entry file.
import "url-search-params-delete";
The polyfill also adds support for .has(key,value)
(supporting a second argument for URLSearchParams.has()
).
const paramsString = "foo=1";
const searchParams = new URLSearchParams(paramsString);
searchParams.has("foo", "1"); // true
searchParams.has("foo", "2"); // false
FAQs
A polyfill adding support for .delete(key,value) to URLSearchParams as discussed at https://github.com/whatwg/url/issues/335
The npm package url-search-params-delete receives a total of 2 weekly downloads. As such, url-search-params-delete popularity was classified as not popular.
We found that url-search-params-delete demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.