
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@hashicorp/react-link-wrap
Advanced tools
Wraps a standard 'a' element to enable NextJS Link usage
In order to use client-side routing in NextJS, we need to pass a custom Link
element. If provided, this component wraps links with the custom element properly and enables full client-side navigation. If not, it's transparent entirely and renders a normal link.
npm install @hashicorp/react-link-wrap
Use this tag as you would normally use an a
tag, but with the additional Link
prop. It will pass through all children and props and behave exactly as if you were using a normal a
tag.
import Link from 'next/link'
export default () => {
return (
<LinkWrap Link={Link} href="/foo/bar" className="my-classname">
My link text etc
</LinkWrap>
)
}
See the props file for more details on props!
The isAbsoluteURL
function returns whether a URL is absolute or relative.
An absolute URL includes a protocol, and a relative URL does not.
import { isAbsoluteURL } from '@hashicorp/react-link-wrap'
isAbsoluteURL('https://hashicorp.com') // true
isAbsoluteURL('mailto:hashicorp@example.com') // true
isAbsoluteURL('data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D') // true
isAbsoluteURL('/products/terraform') // false
isAbsoluteURL('//hashicorp.com') // false
FAQs
Wraps a standard 'a' element to enable NextJS Link usage
The npm package @hashicorp/react-link-wrap receives a total of 3,773 weekly downloads. As such, @hashicorp/react-link-wrap popularity was classified as popular.
We found that @hashicorp/react-link-wrap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 30 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.