This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

fetch-node-release

1.0.1 • Public • Published

fetch-node-release

build

Fetch latest Node.js release version by keyword such as stable, lts/carbon or lts/*.

JavaScript Style Guide

Usage

const fetch = require('fetch-node-release');
 
(async () => {
  let version;
  // fetch latest stable version
  version = await fetch('stable');
  console.log('latest stable', version);
 
  // fetch latest lts/boron version
  version = await fetch('lts/boron');
  console.log('latest lts/boron', version);
 
  // fetch latest lts version
  version = await fetch('lts/*');
  console.log('latest lts', version);
})().catch((err) => {
  console.error(err);
  process.exitCode = 1;
});

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 ;)

Readme

Keywords

Package Sidebar

Install

npm i fetch-node-release

Weekly Downloads

52

Version

1.0.1

License

MIT

Unpacked Size

4.79 kB

Total Files

5

Last publish

Collaborators

  • panva