Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugojosefson/minimum-node-version
Figures out the lowest version of Node.js that satisfies engines.node in package.json.
https://github.com/hugojosefson/minimum-node-version
babel-preset-env nodejs semver version
Last synced: 29 days ago
JSON representation
Figures out the lowest version of Node.js that satisfies engines.node in package.json.
- Host: GitHub
- URL: https://github.com/hugojosefson/minimum-node-version
- Owner: hugojosefson
- Created: 2017-12-08T20:53:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:48:20.000Z (almost 2 years ago)
- Last Synced: 2024-11-14T09:42:08.659Z (about 2 months ago)
- Topics: babel-preset-env, nodejs, semver, version
- Language: JavaScript
- Homepage: https://npmjs.com/package/minimum-node-version
- Size: 968 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# minimum-node-version
[![Build Status](https://travis-ci.org/hugojosefson/minimum-node-version.svg?branch=master)](https://travis-ci.org/hugojosefson/minimum-node-version)
[![npm page](https://img.shields.io/npm/v/minimum-node-version.svg)](https://npmjs.com/package/minimum-node-version)
[![License ISC](https://img.shields.io/npm/l/minimum-node-version.svg)](https://tldrlegal.com/license/-isc-license)
[![SemVer 2.0.0](https://img.shields.io/badge/SemVer-2.0.0-lightgrey.svg)](http://semver.org/spec/v2.0.0.html)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)## Introduction
Figures out the lowest version of Node.js that satisfies `engines.node` in `package.json`.
Can be quite useful for which `node` version to configure `babel-preset-env` for.
## Prerequisite
Node.js, at least `v8.0.0`, but not `v9`.
Recommended to install latest via [nvm](https://github.com/nvm-sh/nvm#readme):
```bash
nvm install stable
```## Installation
```bash
npm install -g minimum-node-version
```## CLI Usage
```bash
minimum-node-version
```Will print the Node.js version.
## Programmatic access
You can also `import` or `require` the module, and use it programmatically.
```js
import minimumNodeVersion from 'minimum-node-version'minimumNodeVersion().then(
version => console.log(version)
)
```### API
##### Table of Contents
- [minimumNodeVersion](#minimumnodeversion)
#### minimumNodeVersion
Figures out the minimum Node.js version that satisfies the project's configuration.
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** A Promise of the lowest compatible Node.js version.