
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Returns a new, absolute URL by parsing the link relative to the base URL. Supports dynamic links. Not vulnerable to Denial-of-Service attacks.
Returns an absolute URL relative to another URL. Not vulnerable to Denial-of-Service attacks.
$ npm install get-link
getLink(base: string, link:string): string|false
import getLink from "get-link";
getLink("http://example.com", "/foo/bar");
// => http://example.com/foo/bar
getLink("http://example.com", "/foo.php");
// => http://example.com/foo.php
getLink("http://example.com", "http://example.com/foo.html");
// => http://example.com/foo.html
getLink("http://example.com/some/deep/path", "../../styles");
// => http://example.com/some/styles
getLink("http://example.com", "#dynamic-website");
// => http://example.com
getLink("http://example.com", "javascript:void(0)");
// => http://example.com
getLink("http://example.com", "mailto:email@example.com");
// => http://example.com
getLink("http://example.com", "http://domain.com");
// => false
$ npm test
FAQs
Returns a new, absolute URL by parsing the link relative to the base URL. Supports dynamic links. Not vulnerable to Denial-of-Service attacks.
The npm package get-link receives a total of 5 weekly downloads. As such, get-link popularity was classified as not popular.
We found that get-link 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.
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.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.