MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / resolveDownloads

Function resolveDownloads

apps/site/scripts/release-post/downloadsTable.mjs:85–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83};
84
85const resolveDownloads = version => {
86 let downloads = downloadOptions;
87
88 if (semVer.satisfies(version, '< 16.0.0')) {
89 downloads = downloads.filter(
90 ver => ver.title !== 'macOS Apple Silicon 64-bit Binary'
91 );
92 }
93
94 if (semVer.satisfies(version, '< 19.9.0')) {
95 downloads = downloads.filter(
96 ver =>
97 ver.title !== 'Windows ARM 64-bit Installer' &&
98 ver.title !== 'Windows ARM 64-bit Binary'
99 );
100 }
101
102 if (semVer.satisfies(version, '>= 23.0.0')) {
103 downloads = downloads.filter(
104 ver =>
105 ver.title !== 'Windows 32-bit Installer' &&
106 ver.title !== 'Windows 32-bit Binary'
107 );
108 }
109
110 if (semVer.satisfies(version, '>= 24.0.0')) {
111 downloads = downloads.filter(ver => ver.title !== 'ARMv7 32-bit Binary');
112 }
113
114 return downloads;
115};
116
117export const downloadsTable = version =>
118 resolveDownloads(version).map(item => resolveUrl(item, version));

Callers 1

downloadsTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected