fetch-node-release
Fetch latest Node.js release version by keyword such as stable
, lts/carbon
or lts/*
.
Usage
const fetch = ; async { let version; // fetch latest stable version version = await ; console; // fetch latest lts/boron version version = await ; console; // fetch latest lts version version = await ; console;};
Caveats
- fetches data from
https://nodejs.org/dist/
so it will reject if there's no internet access or upon HTTP failures - will reject if you provide invalid lts branch name
- will explode the moment node lts releases run out of alphabet ;)