Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

fetch-node-release

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

fetch-node-release

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

    1.0.1latest

Version published
Maintainers
1
Yearly downloads
17,704
decreased by-25.23%

Weekly downloads

Changelog

Source

1.0.1 (2018-10-24)

Refactor

  • now uses https://nodejs.org/dist/index.json instead (08cb2e2)

<a name="1.0.0"></a>

Readme

Source

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

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc