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

Function getNodeApiUrl

apps/site/util/url.ts:7–19  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

5import type { OperatingSystem, Platform, DownloadKind } from '#site/types';
6
7export const getNodeApiUrl = (version: string) => {
8 if (satisfies(version, '>=0.3.1 <0.5.1')) {
9 return `${DOCS_URL}${version}/api/`;
10 }
11
12 if (satisfies(version, '>=0.1.14 <0.3.1')) {
13 return `${DOCS_URL}${version}/api.html`;
14 }
15
16 return satisfies(version, '>=1.0.0 <4.0.0')
17 ? `https://iojs.org/dist/${version}/docs/api/`
18 : `${DIST_URL}${version}/docs/api/`;
19};
20
21type DownloadOptions = {
22 /** The Node.js version string, must include the 'v' prefix (e.g., 'v20.12.2'). */

Callers 2

MinorReleasesTableFunction · 0.90
url.test.mjsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected