MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / DownloadLink

Function DownloadLink

apps/site/components/Downloads/DownloadLink.tsx:11–28  ·  view source on GitHub ↗
({
  release: { versionWithPrefix },
  kind = 'installer',
  children,
})

Source from the content-addressed store, hash-verified

9type DownloadLinkProps = { release: NodeRelease; kind?: DownloadKind };
10
11const DownloadLink: FC<PropsWithChildren<DownloadLinkProps>> = ({
12 release: { versionWithPrefix },
13 kind = 'installer',
14 children,
15}) => {
16 const { os, bitness, architecture } = getClientContext();
17
18 const platform = getUserPlatform(architecture, bitness);
19
20 const downloadLink = getNodeDownloadUrl({
21 versionWithPrefix,
22 os,
23 platform,
24 kind,
25 });
26
27 return <LinkWithArrow href={downloadLink}>{children}</LinkWithArrow>;
28};
29
30export default DownloadLink;

Callers

nothing calls this directly

Calls 2

getUserPlatformFunction · 0.90
getNodeDownloadUrlFunction · 0.90

Tested by

no test coverage detected