(version: string)
| 5 | import type { OperatingSystem, Platform, DownloadKind } from '#site/types'; |
| 6 | |
| 7 | export 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 | |
| 21 | type DownloadOptions = { |
| 22 | /** The Node.js version string, must include the 'v' prefix (e.g., 'v20.12.2'). */ |
no outgoing calls
no test coverage detected