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

Function getNodeReleaseStatus

apps/site/next-data/generators/releaseData.mjs:6–18  ·  view source on GitHub ↗
(latest, eol)

Source from the content-addressed store, hash-verified

4
5// Gets the appropriate release status for each major release
6const getNodeReleaseStatus = (latest, eol) => {
7 const now = new Date();
8
9 if (eol && now >= new Date(eol)) {
10 return 'EOL';
11 }
12
13 if (latest.lts.isLts) {
14 return 'LTS';
15 }
16
17 return 'Current';
18};
19
20/**
21 * This method is used to generate the Node.js Release Data

Callers 1

generateReleaseDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected