npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

lts-schedule

2.1.0 • Public • Published

lts-schedule

The node.js LTS schedule in JSON for programmatic usage

npm Node version Build Status JavaScript Style Guide

Install

$ npm i lts-schedule -S

Usage

const isEOL = require('lts-schedule').isEOL
console.log(isEOL('v0.10')) // true
console.log(isEOL('v0.12')) // true
console.log(isEOL('v10')) // false
const json = require('lts-schedule').json
console.log(JSON.stringify(json.v8, null, 2))

Yields:

{
  "start": "2017-05-30",
  "lts": "2017-10-31",
  "maintenance": "2019-04-01",
  "end": "2019-12-31",
  "codename": "Carbon"
}

Api

const schedule = require('lts-schedule')

Returns an object with the properties listed below.

schedule.isEOL(version)

A function that returns true if version has reached End of Life (EOL), otherwise false.

version can be a string or a Number.

The following calls are equivalent:

isEOL(4)
isEOL('4')
isEOL('v4')
isEOL('v4.8.7')

schedule.json

An object with node.js versions as keys. Each release object has the following properties:

  • start (required) release start date
  • end (required) release end date
  • codename (optional) code name for the release
  • lts (optional) date when lts release begins, required for lts releases
  • maintenance (optional) date when the maintenance period begins

License

MIT

install

npm i lts-schedule

Downloadsweekly downloads

88

version

2.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability