Skip to content

Figures out the lowest version of Node.js that satisfies engines.node in package.json.

Notifications You must be signed in to change notification settings

hugojosefson/minimum-node-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minimum-node-version

Build Status npm page License ISC SemVer 2.0.0 JavaScript Style Guide

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:

nvm install stable

Installation

npm install -g minimum-node-version

CLI Usage

minimum-node-version

Will print the Node.js version.

Programmatic access

You can also import or require the module, and use it programmatically.

import minimumNodeVersion from 'minimum-node-version'

minimumNodeVersion().then(
    version => console.log(version)
)

API

Table of Contents

minimumNodeVersion

Figures out the minimum Node.js version that satisfies the project's configuration.

Returns Promise<String> A Promise of the lowest compatible Node.js version.

About

Figures out the lowest version of Node.js that satisfies engines.node in package.json.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published