@bevry/node-versions
Fetch the Node.js releases and filter them to your preferences
Usage
import {
fetchAndFilterNodeVersions,
fetchESVersionsForNodeVersions,
} from '@bevry/node-versions'
// as of 2020-11-03
console.log(await fetchAndFilterNodeVersions({ maintained: true }))
// [ '10', '12', '14', '15' ]
console.log(await fetchAndFilterNodeVersions({ current: true }))
// [ '15' ]
console.log(await fetchAndFilterNodeVersions({ active: true }))
// [ '12', '14' ]
console.log(await fetchAndFilterNodeVersions({ maintenance: true }))
// [ '10' ]
console.log(await fetchESVersionsForNodeVersions(['13', '14', '15']))
// [ 'ES2019', 'ES2020' ]
Install
- Install:
npm install --save @bevry/node-versions
- Import:
import * as pkg from ('@bevry/node-versions')
- Require:
const pkg = require('@bevry/node-versions')
Editions
This package is published with the following editions:
-
@bevry/node-versions/source/index.ts
is TypeScript source code with Import for modules -
@bevry/node-versions
aliases@bevry/node-versions/edition-esnext/index.js
-
@bevry/node-versions/edition-esnext/index.js
is TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules -
@bevry/node-versions/edition-esnext-esm/index.js
is TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules
History
Discover the release history by heading on over to the HISTORY.md
file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Backers
Maintainers
These amazing people are maintaining this project:
Sponsors
No sponsors yet! Will you be the first?
Contributors
No contributors yet! Will you be the first?
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
License
Unless stated otherwise all works are:
- Copyright © 2020+ Benjamin Lupton
and licensed under: